Triangulation Based Laser Scanner

17
Triangulation based Laser Scanner Sujay S 07D10040 Rakesh Kumar M 07010040 Uday Kumar L 07010031 Jyoti Swaroop Repaka 07010042 November 30, 2009

description

Abstract:During the recent times, the need for contact free measurement for mathematical representation of physical objects has been growing – ranging from transferring modeled clay or wood to a CAD model to analyzing competitors’ products, with recent applications extending to the animation industry. But often they still require complex and expensive equipment. Such equipment unfortunately is too expensive to be afforded by the general public. Access to such scanning techniques could prove to be a great boon to students and hobbyists whose interests may concern reverse engineering a particular component or in modeling a particular object. With the increasing efficiency of hardware and software devices, alternative low cost solutions are in great demand. Such solutions should not only be cheap, they should also present a relative ease and simplicity in their assembly. In this report, we propose such a low-cost system for 3d data acquisition and surface registration. The scanner uses a reference surface that acts as the coordinate system of the object. The object placed in front of the reference surface also acts as a system of the reference surface, and both these surfaces, automatically come together. A single-view image is obtained by sweeping a laser line over the object while keeping the camera fixed and analyzing the acquired laser stripes. The line and the camera can move independently, making it possible to conveniently scan an object while viewing it from different views. The only hardware requirements are a simple handheld point LASER, a glass rod (cylindrical lens) and a standard camera.

Transcript of Triangulation Based Laser Scanner

Page 1: Triangulation Based Laser Scanner

Triangulation based Laser Scanner

Sujay S07D10040

Rakesh Kumar M07010040

Uday Kumar L07010031

Jyoti Swaroop Repaka07010042

November 30, 2009

Page 2: Triangulation Based Laser Scanner

Abstract

During the recent times, the need for contact free measurement for mathematicalrepresentation of physical objects has been growing ranging from transferringmodeled clay or wood to a CAD model to analyzing competitors products, withrecent applications extending to the animation industry. But often they stillrequire complex and expensive equipment. Such equipment unfortunately istoo expensive to be afforded by the general public. Access to such scanningtechniques could prove to be a great boon to students and hobbyists whoseinterests may concern reverse engineering a particular component or in modelinga particular object.

With the increasing efficiency of hardware and software devices, alternativelow cost solutions are in great demand. Such solutions should not only be cheap,they should also present a relative ease and simplicity in their assembly. In thisreport, we propose such a low-cost system for 3d data acquisition and surfaceregistration. The scanner uses a reference surface that acts as the coordinatesystem of the object. The object placed in front of the reference surface also actsas a system of the reference surface, and both these surfaces, automatically cometogether. A single-view image is obtained by sweeping a laser line over the objectwhile keeping the camera fixed and analyzing the acquired laser stripes. The lineand the camera can move independently, making it possible to conveniently scanan object while viewing it from different views. The only hardware requirementsare a simple handheld point LASER, a glass rod (cylindrical lens) and a standardcamera.

Page 3: Triangulation Based Laser Scanner

Contents

1 Introduction 3

2 Structural Design 5

3 Experimental Procedure 73.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Initial Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . 73.3 The Scanning Process . . . . . . . . . . . . . . . . . . . . . . . . 83.4 Shape Fusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Algorithms 10

5 Issues, Future work and Conclusions 13

1

Page 4: Triangulation Based Laser Scanner

List of Figures

1.1 Intersection of the illuminating laser beam and the rays projectedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1 Laser Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1 Reference plane whose dimensions and coordinates are known. . 83.2 Scanning in process . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.1 Laser triangulation . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2 Surface Registration of two surfaces A and B . . . . . . . . . . . 12

2

Page 5: Triangulation Based Laser Scanner

Chapter 1

Introduction

Laser scanning has become widely popular with the advent of Reverse Engineer-ing techniques in the field of manufacturing and rapid prototyping techniques.Scanners which measure co-ordinates of physical objects by triangulating dif-ferent light beams are well known since more than the past two decades. Thescanning process could be done using a myriad of techniques like structuredlight, coded light, time of flight, etc. Laser range scanners are commonly used forcontactless measuring of surfaces and 3d scenes in a wide range of applications.The field of application includes, areas like manufacturing, reverse engineering,robotics, industrial design, medical diagnosis, archaeology, multimedia and webdesign, as well as rapid prototyping and computer-aided quality control.

Most commercial laser scan systems use a camera and a laser beam or laserplane. The measurement here is based on triangulation, i.e. the intersection ofthe illuminating laser beam and the rays projected back to the camera as shownin the Figure 1.

This is generally coupled with expensive high precision actuation, for ro-tating/translating the laser plane the object. With recent advancements incomputational techniques, devices have been developed which avoid the use ofexpensive actuators. These approaches have to determine the position and orien-tation of the laser device on-line and to permanently avoid an external trackingsystem. In place of an external tracking system, we propose a real-time self-calibration of a hand-held laser plane, which is based on a simple analysis of thelaser stripes in the camera images. Thus, the laser line can be swept manuallyover the object during the scan. This method has the following advantages:

1. Low cost

2. Flexibility

3. Simplicity in Design

This approach has been investigated by Lyubomir Zagorchev and ArdeshirGoshtasby of the Wright state University[4]. They use a reference double-frame,which is placed around the object and acts as calibration target. The approach,involves calibration of the LASER using the four visual intersection points of thelaser and the double-frame. We could however make the calibration more flexibleby designing the process in such a way that the calibration target can be almost

3

Page 6: Triangulation Based Laser Scanner

Figure 1.1: Intersection of the illuminating laser beam and the rays projectedback

arbitrarily shaped (e.g. an arbitrary background). The laser calibration can bemade more robust and accurate, by using more than four points to calibratethe laser, and rely on sub-pixel analysis of grayscale difference images. Due toour subsequent fast surface registration, the object can be moved freely betweendifferent scans thus, avoiding repositioning and recalibration of the camera toget different viewing directions. A very popular surface registration approachis the ICP. The algorithms used are discussed later.

In this report, a scanner mechanism is introduced that allows independentmovement of the camera and the laser projector during a scan, enabling theuser to deviate the output from a laser line generator. One view of an objectis obtained by fixing the camera and sweeping the laser over the object withhand.[3, Page 718] The camera is then moved to scan the object from a differentview. A reference surface placed behind or in front of the object is used toautomatically calibrate the scanner and relate the coordinate system of thecamera to the coordinate system of the surface based n markers. The hardwareand the computational algorithms to be used are also discussed.

4

Page 7: Triangulation Based Laser Scanner

Chapter 2

Structural Design

The hardware organization of the scanner is depicted in Figure 2.1. The basicdesign of this device is quite simple. The laser ray, expanded to a plane by acylindrical lens, has to intersect two things at the same time: the (unknown)surface, and the a priori known reference geometry (usually the background).The visible intersection with the background is used to calibrate the laser (cal-culate the spatial orientation of the LASER plane). With this knowledge wecan triangulate new 3d point coordinates of the objects surface by intersectingthe laser plane with the projecting rays. Certainly, the camera must have beencalibrated so that its external and internal parameters are exactly known. Thus,the exact coordinates of the background structure with respect to the cameracoordinate system are implicitly known.

As mentioned earlier, Scanning is done by sweeping the laser light over anobject by hand. In this manner, dense range data can be captured in some areaswhile sparse data are captured in other areas. Effectively, the laser sweepingprocess can be automated using a rotating mirror, a rotating arm, or a transla-tion stage. The global reference for the computation is attached to the referencesurface, and as long as the position of the object remains fixed with respect tothe surface, object coordinates determined from different views will all be in

Figure 2.1: Laser Scanner

5

Page 8: Triangulation Based Laser Scanner

the same coordinate system and thus will automatically produce a unique setof data pertaining to the object. The scanner, therefore, makes it possible tocombine different-view range images of an object without registering them.

6

Page 9: Triangulation Based Laser Scanner

Chapter 3

Experimental Procedure

3.1 Experimental Setup

For experimental evaluation, we used a grayscale CCD webcam, connected to astandard Intel PC with 2.16GHz. The scanning accuracy naturally depends onthe exactness of the camera calibration, triangulation angle and the thicknessof the LASER plane. To evaluate the accuracy of our laser scanner, we havescanned a well-known test object under a reasonable triangulation angle of about0− 30, and a distance of 600mm to the camera. The scan result contains thisstep within a tolerance of less than 0.4mm. The measured (unfiltered) depthvalues of each surface are very accurate and show an RMS error of only 0.37mm.

3.2 Initial Calibration

As discussed earlier, the camera needs to be calibrated before any initial runsin order to establish correspondence between image points and points in thereference surface. It is required to determine the coordinates of the markers onthe frames in an acquired image. After a successful calibration, the co-ordinatesof the markers in the background are known exactly. In our experiment, themarkers are black circles and dots on a white background, as shown in Figure3.1.

For more effective and faster calibration however, the markers may be madeof light-emitting diodes with distinct colors for the front and black frames tomake them more easily distinguishable in the images. The position and orien-tation of the laser plane is determined in each image after the relation betweenimage points and points in the front and back frames are determined. Also,the position and orientation of the camera is determined from the coordinatesof the markers, in the picture. Once the camera position and orientation, andthe equation of the laser plane are determined, the coordinates of points in thescene can be determined from their images, based on the design described inChapter 2.

There are a few sources of error that could degrade the calibration process.For instance, due to the digital nature of images and the presence of noise, thecenter of a marker could be off by a pixel or two. The intersection of a laser planewith the frame border could be displaced by a pixel due to the digital nature of

7

Page 10: Triangulation Based Laser Scanner

Figure 3.1: Reference plane whose dimensions and coordinates are known.

images. Determination of camera position depends on the intersections of laserlines with the frame borders; therefore, errors in determining the intersectionswill carry over to errors in camera position, and errors in camera position directlyaffect accuracy in computed co-ordinate values. The errors and ambiguities canbe reduced or removed by using very small LED markers, a brighter laser, adarker environment lighting, and a higher resolution camera.

3.3 The Scanning Process

During the scanning process, the image and the ambient settings are madevery dark. Then the LASER plane is swept along the surface of the object,up and down repeatedly. For effective rendering of the object, this sweepingis to be done repeatedly, so that the data acquired is sufficient enough for theinterpolation. A picture of the object during the process of scanning is shownin Figure 3.2.

3.4 Shape Fusion

Various algorithms are available for surface registration.

• It is based on the Iterative closest point (ICP) algorithm.[1]

• The ICP iteratively improves a good initial solution.

• The algorithm makes use of surface features like point signatures, surfacecurves, spin-images, or salient-points.

8

Page 11: Triangulation Based Laser Scanner

Figure 3.2: Scanning in process

• Surface registration method is a significant improvement of the randomsample matching (matching fragments of broken objects without knowingthe initial solution).

• This method is based on the RANSAC (Random Sample Consensus)[2]algorithm for fitting a model to experimental data.

The algorithm used is explained in brief later.

9

Page 12: Triangulation Based Laser Scanner

Chapter 4

Algorithms

In order for scanner to measure the co-ordinates of an object accurately, it isnecessary that we make the computer to get accustomed to a known surface,from which all future calculations should be based. In many cases, a simplebackground (e.g. the natural environment) can be used. Under the assumptionthat the background geometry is known, we can obtain some point coordinatesof the visible laser line by intersecting background and the LASER plane. These3-D intersection points constrain all degrees of the laser planes pose. Althoughmany background shapes are imaginable, we have used a technique, which in-volved capturing the image of a paper with a print of the markers and stuck totwo mutually perpendicular surfaces. Details about this work are given in thepreceding paragraphs.

As shown in Figure 4.1., a camera image captures the 2D representation ofa 3D intersection points of the plane of Laser beam ELaser and the surface ofthe object under scan p.

Suppose, I is the camera image of the scan with the object and IR is theimage without the laser of the background, then a difference in images Id canbe derived.

Id = I − IR (4.1)

We, then perform a 1D detection of the laser line in each row and columnof the image Id and get a Y (x) of the line r. This Y (x) is then used by theRANSAC algorithm[2] to get a 3D map of the points under scan.The algorithm in short is as follows:

3 close random points are selected on the differential image Y (x1),Y (x2), and Y (x3). These are assumed to lie on a single plane. Andsince the plane of the laser is known from the computation with thebackground, we get the plane in which these 3 random points lie in.Thus we can get the 3D coordinates of the 3 points p1, p2, p3.

p = r ∩ ELaser (4.2)

where,

p is the surface plane of the object under scan.

r is the line laser image

10

Page 13: Triangulation Based Laser Scanner

Figure 4.1: Laser triangulation

ELaser is the plane of the Laser beam.

Increasing the number of laser-sweeps increases the accuracy of the scan.After all the 3D points have been collected in one direction, we proceed to scanall other directions by rotating the object under scan. (0, 90, 180, 270).To get a full 360 model, scans from different directions have to be registeredtogether.

Scans from different directions can be registered together in the followingway.[3, Page 192]Consider two scans A and B as in Figure 4.2 . Define a set of pose Hypothesisfor 2 sets A and B as:

H := (a, b, c, d)|rel(a, c) = rel(b, d); a, c ∈ A; b, d ∈ B (4.3)

where, rel(u, v) is defined as follows:

rel(u, v) :=

duv

cosαuv

cosβuvδuv

:=

‖pv − pu‖nu.puvnv.puv

atan2(nu.(puv × nv), (nu × puv).(puv × nv))

(4.4)

where,

duv is the Eculidean point distance.

αuv is the angle of inclination.

βuv is the angle between normals.

11

Page 14: Triangulation Based Laser Scanner

Figure 4.2: Surface Registration of two surfaces A and B

δuv is the rotation angle.

After generating pose Hypothesis, we measure its matching quality. This isdone by a Monte-Carlo strategy using a sequence of random points in which theproportion of overlapping area (Ω) is estimated.A particular ε is defined (small-enough). And two points are said to coincide ifthe distance between them is less than ε.

contactB(x) :=

1 if distB(x) < ε

0 else(4.5)

with,distB(x) = min

y∈B‖x−A TB (4.6)

Then Ω, the proportion of overlapping area can be computed with 95% accuracyas:

Ω =

∑ni=1 contactB(xi)

n± 1.96

2√n

(4.7)

12

Page 15: Triangulation Based Laser Scanner

Chapter 5

Issues, Future work andConclusions

The major issues regarding the project areas follows-

1. Imperfections in the laser cheap lasers could have a significant divergencein the laser beam

2. External optical disturbances - Light reflected from the environment couldcause a decrease in accuracy in surface registration.

3. The setup should not be disturbed during the scan as calibration wouldbe required for a new relative position of the camera.

4. Increase of thickness of the plane of line-laser may decrease the accuracy.

5. Laser-scanning is not suitable for objects with sharp edges.

On the contrary, the scanner does not require that the laser source and thecamera be fixed with respect to each other like in commercial LASER scanners.The user may hold the laser line generator and sweep over the object to scanit. If desired, the laser source may be translated or rotated automatically usinga translation stage or a rotating mirror. The scanning process is most effectiveand computationally less intensive if the whole process is automated and madehands free.

With an effective enough LASER and a better capturing techniques andalgorithms, even small shape details are acquired accurately and the accuracycan reach values of up to 0.4 to 0.7mm!

To sum up the findings, the future prospects of this project can be:

1. Complete automation of the process using encoder based DC motor orstepper actuator etc.

2. Dedicated thin and bright line laser with low divergence.

3. Explore the possibilities of converting the obtained scan from .obj file toSTL or VRML formats which could then be uploaded to a prototypingmachine.

13

Page 16: Triangulation Based Laser Scanner

4. Include support sharp edges using white light scanning.

The hardware and computation involved in the design and working of theLASER scanner were discussed. The scanner uses a reference surface to captureimages and computationally merge them.

Thus, we demonstrated a very effective but simple LASER scanner, with adecent accuracy for most of the common purposes and sufficient to build up asystem for 360-object-reconstruction, which is on par with the other commer-cially available, expensive techniques.

14

Page 17: Triangulation Based Laser Scanner

Bibliography

[1] Besl, P., and McKay, N. A method for registration of 3-d shapes. IEEETransactions on Pattern Analysis and Machine Intelligence 14, 2 (1992),239–256.

[2] Fischler, M. A., and Bolles, R. C. Random sample consensus: aparadigm for model fitting with applications to image analysis and auto-mated cartography. Commun. ACM 24, 6 (1981), 381–395.

[3] Simon, W., Sven, M., and Friedrich, M., W. Pattern Recognition.Springer Berlin / Heidelberg, 2006.

[4] Zagorchev, L., and Goshtasby, A. A paintbrush laser range scanner.Computer Vision and Image Understanding 101, 2 (2006), 65 – 86.

15