For this assignment, I worked in group with Yi Ren, Danwei Li, and Akash Abhijit Bapat.
This assignment explores generalized pinhole photography. The basic assignment will be to make a stereo (anaglyph) pinhole camera and use the images to reconstruct the depth of objects in a scene. The next part of the assignment will be to make pairs of images to compute "anti-pinhole" images. The graduate extensions will be to use high dynamic range to improve the quality of the anti-pinhole images and to use automated techniques for correspondence in stereo reconstruction.
We built up a stereo pinhole camera. We used a paper-card box as the camera body, and used the red and green transparent papers as the filters on the two pinholes respectively. We also used black papers to cover the corners and edges of the box to prevent noise light as well as every internal surface this box, except the one that is supposed to be the screen, where we used a pure white paper.
The following pictures show how our stereo pinhole camera looks like.
Leveraging the camera we built, we got the anaglyph photographs and we separated anaglyph color channels to get stereo image pairs. Because of the relatively small size of the pinholes, we got little light into our camera box. Therefore, in order to acquire visible stereo image pairs, we multiplied the pixel values in our stereo image pairs by a constant 5. We also recovered the upside-down anaglyph to correct direction, i.e., the stereo image pairs are not upside-down.
The code is split.m.
The following pictures are our results.
In this part, we manually determine the corespondent points in the two images of a pair, and then compute the depth of the point.
The code is ManualCorrespondence.m and twoPointsDepth.m.
The following is our results.
In this part, we automatically determine the corespondent points in the two images of a pair, and then compute the depth of the point. Since the automatically part is difficult to do with the pinhole image pairs, we took our picture pairs to do this part.
The code is AutoCorrespondence.m.
The following is our results.
We used a small ball supported by a transparent ruler to do the anti-pinhole part. Since the conditions, such as lights, stability of the ball, noise, are not ideal, we can only get blurred images, but the colors make sense.
The code of HDR is HDR.m.
The following is our results.