Monday, May 12, 2014

3D Photos - Lily

Here's a stereo pair (courtesy of Bill Brandt) for which we're gonna try to get a depth map:


Left image.


Right image.

The images are 1000x1187. Disparity Finder 2 (DF2) tells me that the minimum disparity is -68 (background) and the maximum disparity is 4 (tip of nose). For this particular depth map generation task, I chose Depth Map Automatic Generator 2 (DMAG2). DMAG2 is quite similar to Depth Map Automatic Generator 3 (DMAG3) when the smoothing parameter is set to 0 but it uses much less memory (than DMAG3).

DMAG2 generates a depth map by matching windows/blocks in the two images. It's a completely local method. The greater the window radius, the more accurate DMAG2 is. Of course, the larger the window, the slower DMAG2 is, as well. DMAG2 computes two depth maps, one for each image. The two depth maps are checked for consistency and the matches that are not consistent are flagged. The matches that were flagged for inconsistency are shown in black in the occlusion map. At any black pixel, the depth computed with image 1 as the reference image doesn't match the depth computed for image 2 as the reference image. For any of those flagged pixels, the depth is recomputed using adjacency information. The depth maps DMAG2 produces are corrected depth maps.

Truly occluded pixels (present in only one of the two images) will certainly show up in the occlusion map but they aren't the only ones. Pixels in areas of low texture will most likely show up too. To reduce the number of mismatched pixels, it would be a good idea to increase the window radius. To a certain point, of course. I would limit the window radius to a value of 17. If you go past 17 for the window radius, the gamma proximity parameter should be set to the window radius.


Occlusion map (window radius = 12). This shows all the pixels (in black) where the depths are questionable.


Depth map with image 1 (left image) as reference (window radius = 12).

Just for fun, this is what you get if you increase the window radius to 17:


Occlusion map (window radius = 17).


Depth map with image 1 (left image) as reference (window radius = 17).

No comments:

Post a Comment