Stereo pair taken with an HTC evo 3d phone. Size is 1887x1060 after auto-aligning in Stereo Photo Maker. I like to use the auto-alignment feature in Stereo Photo Maker and then click "Make an animation gif" to see if the wiggle/wobble that I intend to create via a depth map is gonna look good. Even though the stereo pair has been aligned in Stereo Photo Maker, I still rectify it with ER9b or ER9c.
Here is part of the output from ER9b:
Mean vertical disparity error = 0.457357
Min disp = -75 Max disp = 19
Min disp = -55 Max disp = 23
I am gonna use the rectified images to get a good depth map in a two-step process. ER9b gives me the min and max disparities in the 2nd of the 2 lines that give the min and max disparities (-55 and 23).
Step 1: Let's get a quick and dirty depth map using DMAG5b, a very rudimentary (but fast) depth map generator!
This is what I used for DMAG5b:
min disparity for image 1 = -55
max disparity for image 1 = 23
radius = 4
alpha = 0.9
truncation (color) = 30
truncation (gradient) = 10
disparity tolerance = 0
radius to smooth occlusions = 9
sigma_space = 9
sigma_color = 25.5
Because I am gonna use DMAG9b to improve the depth map quality, it's totally ok to use DMAG5b and it's totally ok to use it with a small radius like I did. Yes, there is quite a bit of noise but it really does not matter at this stage.
I am showing the corresponding occlusion map to give an idea of the quality of the depth map. Black means that the disparity in the depth map is probably not correct. Yes, there is quite a bit of black but no worries as DMAG9b will clean all that up nicely.
Step 2: Let's improve this noisy depth map with DMAG9b!
Parameters I used in DMAG9b:
sample_rate_spatial = 16
sample_rate_range = 8
lambda = 0.25
hash_table_size = 100000
nbr of iterations (linear solver) = 25
sigma_gm = 1
nbr of iterations (irls) = 32
radius (confidence map) = 12
gamma proximity (confidence map) = 12
gamma color similarity (confidence map) = 12
sigma (confidence map) = 32
I think this is a drastic improvement. DMAG9b is very good at improving depth maps, no matter where they come from.
The confidence map is computed by DMAG9b in the beginning of the computation. It shows the confidence in the disparities/depths in the input depth map (the one produced by DMAG5b) that DMAG9b has. The blacker the value, the less confidence DMAG9b will have in corresponding disparity/depth.
Automatic depth map generation, stereo matching, multi-view stereo, Structure from Motion (SfM), photogrammetry, 2d to 3d conversion, etc. Check the "3D Software" tab for my free 3d software. Turn photos into paintings like impasto oil paintings, cel shaded cartoons, or watercolors. Check the "Painting Software" tab for my image-based painting software. Problems running my software? Send me your input data and I will do it for you.