Jan Huybrecht portfolio website
current project
3d stills and animations
computer graphics projects
other

contact
Current project:

3d acquisition with stereo webcams
using c++ and opengl

Currently I'm working on a project to retrieve 3d geometry from a scene using two webcams.
I set up two webcams close to oneanother pointing to the same location (focal point) in space. I check all the pixels in the first image, and crossreference them with all the pixels in the second image. If I find a match, I can triangulate the pixel in 3d space. If I do that with as much pixels as possible, I will recreate the real scene in a virtual scene.

1. setup:

I place the two camera's at a distance d from oneanother, rotated around an angle alpha.
stereo setup top view stereo setup perspective view

2. take pictures:

Because of the different positions of the camera's, I will get two slightly different images from my scene.
left camera view right camera view

3. find pixel matches:

In a next step, I search for all the 3x3 pixel areas that have a high contrast value (like sharp corners). I do this for both images. After I have gathered a list of areas, I crossreference the list of both images and look for matches (with a certain margin of error to account for the noise and other distortions).
find pixel in left image find pixel in right image

4. triangulate

Now that I know what pixels match and what their x and y (screen-) coordinates are, I can calculate a line from each camera's origin, trough the pixel. The place where the two lines cross is where the pixel is in 3d space (depth = z-coordinate).
triangulate