I already showed some pictures and information about this project.
Post No 1
Post No 2
Post No 3
This article will finish the series and will give more details about the past work.
The basic idea was to get 3D Information with the use of a line laser which is reflected by objects. This line can be used to calculate how far away something is.
This is only possible when I know the following: relative position of camera and laser, opening angles of the camera, resolution of images.
The reflected light of objects comes from the laser and goes into the camera. Therefor we need to calculate where a virtual ray from the camera intersects with the laserlight. To simplify calculations the laserlight is interpreted as an infinite plane in space. Since the laser is only visible when its light is passing the frustrum of the camera this is no problem. The ray from the camera is calculated Pixel by Pixel. Each lit pixel is converted to a point in realworld coordinates with the help of the opening angles.
To get the realworld 3D Point, we need to calculate the intersection of the ray with a plane. Thats all.
How to get the image of the laserline?
You need two images to get the laserline. Switch off laser, capture an image, switch on laser, take another image. The difference between images should only be the laserline.
To reduce the noise, a median filtering was used. To get only Pixels of a line, a ringfilter was used.
Interpolation was done only when to pixels where close to each other. Otherwise edges would be destroyed.