Saturday, August 25, 2007

Computer Vision and Photography (33): Capturing stereo images using a single camera

Chak De INDIA

When I started my work on stereovision I used to download stereo images from the internet for my experiments. I didn’t have a camera then. By the time I could afford one, the statement “taking images at an offset” had become as synonymic as stereo images. Since I couldn’t afford two similar cameras for both cost and reasons of inutility I started to take my own stereo images by moving the camera a bit to the side (to create that offset) for shooting the second image. I even went to the extent of thinking to developing an attachment for my tripod to create a flat base for this movement! I always thought that research would make the mind sharper to thinking of new ways to deal with the subject, but seems like it didn’t work out in my case at that instant. Instead of developing an attachment for my tripod, why couldn’t I think of developing an attachment for my camera so that I could totally eliminate this requirement of moving it for shooting the second image? It didn’t take much time for this innovation to bloom in me and I immediately rushed to the nearby glass vendor to prepare this arrangement.

It is simple (figure only for conceptual understanding). Like our eyes, I keep two plane glasses at an offset and direct light to the lens of my camera through a pair of pair of 45 degree mirrors as shown in the figure. So in a single sensor I capture both the images, each on one half of it.

Given a camera and a requirement to take stereo images, this arrangement was anyone’s mind game. I thought simple things like these need not be documented. A few months after this finding I saw a paper on exactly the same concept from a university in Switzerland. Do we really need PhDs to build this school level optics? Now I know the reason behind the very poor numbers behind India’s contribution towards the world’s papers and patents. Are we too fainéant to put our findings on paper or do we think we are not up to the mark in creating new things when compared to others? That too when others are confident of such simple findings.

CHAK DE INDIA: FLAUNT YOUR FINDINGS

Saturday, August 11, 2007

Computer Vision (32): Monocular Cues

Under this topic, focus was the only one I wanted to drag a lot since it is very much required for my techniques on depth perception. I will mention a few other cues here that are even though very obvious to anyone, are required for the completeness of the topic. Monocular cues are better understood from photographs, so here’s one to explain all the three I will be mentioning:

Taking any one of the cars in this picture as reference we can very easily guess the relative position of the others in the image. This cue is called “Familiar size”. It works not only for similar objects but anything around you. Where this cue takes a beating sometimes there is another that drops in to resolve this issue; “Interposition”. On the left we have a red and a silver car projecting the same size even though both are not at the same depth. How do I know? My brain tells me that some portion of the red car is occluded by the silver one which means that the latter should be in front of it.

Bringing in the rest of the image you can see that the road in the above figure appears to get narrower farther it is considered from the camera. Taking this cue as reference you can almost separate the different regions in this image into their depth categories. The small hilly region on the right is farther away from the lake on the left. The fountain is definitely closer to the camera than the lake, etc. This is called “Linear Perspective”; the convergence of parallel lines as they move away from you.
All these cues supplemented with our knowledge will always give us if not accurate a misty information about depth even in a 2D scenario.