Thursday, June 16, 2016

Depth Map Automatic Generator 2 (DMAG2) vs Depth Map Automatic Generator 5 (DMAG5)

In this post, I would like to compare the quality of depth maps generated by Depth Map Automatic Generator 2 (DMAG2) (the contender) and Depth Map Automatic Generator 5 (DMAG5) (the champion) for three stereo pairs taken by a Fuji W3.

For DMAG2, I used these parameters for all stereo pairs:

radius = 32
alpha = 0.9
truncation value (color) = 30
truncation value (gradient) = 10
gamma_p = 32.0
gamma_c = 12.0
disparity tolerance = 0
downsampling ratio = 2

Because DMAG2 is slow, you can't use the images as is (downsampling ratio = 1), you have to downsample them a bit (downsampling ratio > 1). To give you an idea, for these 1200x703 images, it takes under 5 minutes to get the depth map when the downsampling ratio is set to 2 but it takes more than one hour to get the depth map when downsampling is set to 1 (no downsampling).

For DMAG5, I used these parameters for all stereo pairs:

window radius = 32
alpha = 0.9
truncation value (color) = 30.0
truncation value (gradient) = 10.0
epsilon = 4
disparity tolerance = 0
window radius (occlusion smoothing) = 9
sigma space (occlusion smoothing) = 9.0
sigma color (occlusion smoothing) = 25.5
downsampling ratio = 1

Stereo pair 1 (min disparity = -26 and max disparity = 19):


Left image after epipolar rectification.


Right image after epipolar rectification.


Left depth map produced by DMAG5.


Left depth map produced by DMAG2.

Stereo pair 2 (min disparity = -62 and max disparity = 13):


Left image after epipolar rectification.


Right image after epipolar rectification.


Left depth map produced by DMAG5.


Left depth map produced by DMAG2.

Stereo pair 3 (min disparity = -18 and max disparity = 31):


Left image after epipolar rectification.


Right image after epipolar rectification.


Left depth map produced by DMAG5.


Left depth map produced by DMAG2.

Conclusion:

Looks like DMAG2 can be about as good as DMAG5 (better in some cases and worse in others). The only parameter that really matters is the window radius, so it should be chosen carefully. Note that gamma_p should not be smaller than the window radius. So, if you increase the window radius, gamma_p should follow and be set equal to the radius (or larger).

No comments:

Post a Comment