kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Mini laser scanner - part 3 (scanning)

Klemen
Active Participant

I have managed to get my laser scanning system working. I still have some problems since there are some perspective errors (distortions) in my scans, which I still need to correct.


Figure 1 shows the scanning setup. The frame is from thin sheet metal (2 mm), which was bent by hand with the help of a vice. The camera and the laser projector are attached to this frame using a seperate thin sheet metal frame. The geometry was designed according to the calculations I have made in the previous post (Mini laser scanner - part 2). All the components were fastened to a wooden board. I also used a thick white cardboard as a pedestal to reflect the laser light more efficiently.

setup.jpg

Figure 1. Laser scanning system setup.

To successfully calculate the points in 3D space, some parameters have to be determined:

1. Intrinsic camera parameters (fu, fv, cu, cv, k1, k2, p1, p2). These were determined using a chessboard pattern and camera calibration toolbox in Matlab. For comparison, I also determined the same parameters using the NI calibration training interface and a dot pattern grid.

2. Extrinsic camera-projector parameters (Py, Pz, alpha). Py and Pz are the coordinates of the laser projector in the camera coordinate system. Alpha is the triangulation angle. These parameters were not accurately determined, since there is some math behind this. I would also need a reference body with known dimensions and iterative algorithms (which I do not have, nor do I have the time to code them) to determine the smallest deviation between the measured and the reference surface. Currently I do not know of any other methods to determine the mentioned parameters. If anyone knows alternative methods, please share them…


So instead I attached a measuring tape to the frame (can be seen in the Figure 1) and photographed the measuring system from the side, so that the optical axis of the camera and the laser were parallel (or close to parallel) to the image plane (photographed). The image was transferred to Autocad and the required parameters measured and transformed to real-world units using the measuring tape of known spacing.

3. Transformation parameters from camera to world coordinate system. In order to take into account the motion of the stepper motor, the 3D camera coordinates have to be transformed to the world coordinate system (stepper motor coordinate system). Thus, the speed of the motor in the motion direction can be taken into account and the subsequent acquired profiles can be spaced accordingly. The transformation from camera coordinate system to world coordinate system was also performed using the Matlab camera calibration toolbox.

The speed of the motor in real-world units (at different steps and speeds) was determined by measuring the traveled distance (laser line as the reference) in the corresponding time (Arduino timer library). For all the presented scans, my scan speed was ~2.1 mm/s.


Video 1 shows an example of a scan and here is the link to youtube video: http://www.youtube.com/watch?v=Krd4lKoVa8k

Video 1. Example of a scanned hand.

Figure 2 shows another scan of an object (small radio with speaker).

scanned_speaker.jpg

Figure 2. Scanned radio speaker.

Figure 3. shows another scan of a refrigerator magnet.

scanned_magnet.jpg

Figure 3. Scanned refrigerator magnet.

The laser scanning system is not perfect, but it server the main purpose – learning something new every day. I think it would be better to move the camera-projector pair and not the pedestal where the object is placed. But this is another story for another day. To put it plainly – my scanning system needs a lot of improvement in order to get accurate scans. But the main principle of laser scanning is covered in my mini scanner project. Maybe I will take some time in the future to improve it.


So, the total cost of the system:

1. camera: 20 eur,

2. projector: 4.6 eur,

3. filter: 3.5 eur,

4. motor driver: 1.9 eur,

5. old document scanner with stepper motor: free

6. frame (with screws, nuts, etc…): 10 eur,

7. wooden board and cardboard pedestal: 5 eur.

Total costs: 45 eur.

Not counting the Arduino which I use for other stuff and was already here before the scanning system.

So the total cost is half the cost I predicted at the beginning. Yippee!

Thanks for reading.


Be creative.


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Comments