Simple 3D Laser Scanner
technology·@matiascec·
0.000 HBDSimple 3D Laser Scanner
<html> <blockquote><img src="https://1.bp.blogspot.com/-iVEXnQh3HhM/VOjQ6szOUHI/AAAAAAAAAMc/wYwlhLEVt8k/s1600/3D.png" width="1108" height="676"/></blockquote> <blockquote>The process :)</blockquote> <h4><strong>On my first post, I would like to share a previous project I've been working on: how to make a simple 3D Laser Scanner. All you need is a laser pointer (any colour you like), a glass of wine, a video camera (phone or webcam also work) and a rotating platform.</strong></h4> <h3><em><strong>The Set Up</strong></em></h3> <p>First of all, you'll have to put the object in the rotating platform (in my case, I was using a beam over a <a href="http://en.wikipedia.org/wiki/Stepper_motor">stepper motor</a>). Make sure it's in the very middle of it.<br> Then you'll have to position the camera, laser and cylindrical lens (in this case the stem of the glass). It's important you take note of the angle between the laser and the camera, you'll need it for the calculation.<br> Make sure the lens is clean, since the laser is passing through and any imperfection can distort the shape of the beam, we want a beautiful vertical narrow and clear line impacting over our object.</p> <p><br> <em>Note: if you're working on a lab and can have access to optical lenses, then use them!!</em></p> <p><br> This is how the beam should look like, share yours ;)</p> <blockquote><img src="https://1.bp.blogspot.com/-ArvHXsYwmUg/VOd99ZgnCpI/AAAAAAAAAL4/3oWRKcOcRFM/s1600/Untitled.png" width="919" height="1231"/><br> Bumblebee is ready</blockquote> <h3><em><strong>Recording!</strong></em></h3> <p>Turn the laser on, lights off (make sure you can only see the object and maybe the platform) and the camera is on. Remember white light contains all colours, it's nice for the world we live in, but not for our image filters.</p> <p>Here is how it should look like:</p> <blockquote><img src="https://4.bp.blogspot.com/-Rjxrn9stLVI/VOjXJskvGgI/AAAAAAAAANA/w4yfnCeF1Rg/s1600/1.png" width="376" height="326"/></blockquote> <blockquote>Lights, camera, action!</blockquote> <h3><em>The Results</em></h3> <p>Here you can see the calibration. If the video was not in a correct angle, you can change that. You also have to tell the program which is the center of the rotating platform and the ROI (Region Of Interest), so the program knows where it has to pay attention to and will ignore all the other parts of the images when processing.</p> <blockquote><img src="https://2.bp.blogspot.com/-98madH38JQ8/VOjQ6uGZcOI/AAAAAAAAAMY/f2igaiZ_Pmk/s1600/2.png" width="567" height="461"/></blockquote> <blockquote>Making the calibration </blockquote> <p>It will analyze every image that is part of your video and calculate a line where it can find the maximum intensity of the laser beam. If it cannot find anything (we are using some filters in between), it will use interpolation between the nearest points.</p> <blockquote><img src="https://1.bp.blogspot.com/-jfqUrkdpz_8/VOjQ6u5swYI/AAAAAAAAAMs/8zs8nE0ckSw/s1600/3.png" width="191" height="221"/></blockquote> <blockquote>It's alive!! Calculating the max intensity of the laser beam</blockquote> <p><br> This is the resulting 3D model...</p> <blockquote><img src="https://2.bp.blogspot.com/-hhIrVURnm7c/VOjQ7NWinTI/AAAAAAAAAMg/6ulmfs-X3H0/s1600/4.png" width="455" height="429"/></blockquote> <blockquote>And magic!!</blockquote> <h3><em>Code & More Info</em></h3> <p>You can find the code >><a href="https://www.dropbox.com/s/7dea1shm7yw5mus/Simple3DScanner.m?dl=0">here</a><< (only for MATLAB)</p> <p>If you want more information on Laser Triangulation Methods, >><a href="http://dugi-doc.udg.edu/handle/10256/4930">this</a><< document might help</p> <p><br></p> <p> <em>Note 1: MATLAB is a proprietary software. If anyone is able to translate the code into an open source platform, I'd love to share it too.</em></p> <p><em>Note 2: the quality of the 3D-model is directly correlated to the quality of the video, laser and lenses and the setup. This is a simple example but this method can achieve great results with some proper investment.</em></p> </html>