Tuesday, February 3, 2015

3D Photos - Lady with flowers

This is a stereo pair that was sent to me by a reader of this very blog. It's a scan of a Realist slide.


Left image.


Right image.

From the get go, you kinda know that it's likely the depth map for the background is going to be wrong (You need tecture to get accurate depth maps.) Not really a big deal.

For the disparities, I am gonna use minimum disparity = -16 and maximum disparity = 10. It's not a big deal if the min and max disparities are not accurate as long as they are overshot (The real max disparity is probably smaller than 10 but it's ok.)

Let's put Depth Map Automatic Generator 5 (DMAG5) to work.


Left depth map obtained using window radius = 12, alpha = 0.9, truncation value (color) = 7, truncation value (gradient) = 2, epsilon = 4, number of smoothing iterations = 1, and disparity tolerance = 0.

These are the default parameters. We can probably do better by playing around with the parameters.


Left depth map obtained using window radius = 24, alpha = 0.0, truncation value (color) = 128, truncation value (gradient) = 2, epsilon = 4, number of smoothing iterations = 1, and disparity tolerance = 1.

By setting alpha to 0.0, you are relying on color information only to make stereo matches (The color gradient is not involved at all.) By default, stereo matches are made by relying mostly on the color gradient (alpha = 0.9). Playing around with the parameters is no dark science and, in most cases, it's basically trying things out and see what works best.

That's about the best depth map I can get with DMAG5. To get the right depth map, the left and right images are flipped horizontally. The flipped right image is the new image1 and the flipped left image becomes image2. The depth map obtained using the exact same parameters (including min and max disparities) is flipped horizontally to give us the right depth map. From there, we can use Frame Sequence Generator 6 (FSG6) to generate the tweeners (interpolated views between the left and right image).


Animated gif obtained by animating the frames coming from FSG6.

It's possible to kinda smooth the depth map and make it possibly better using Edge Preserving Smoothing 5 (EPS5).


Left depth map after edge preserving smoothing.


Animated gif obtained by animating the frames coming from FSG6 (using the smoothed depth maps).

No comments:

Post a Comment