## Saturday, December 2, 2017

### 3D Photos - Reversing Rapids in Saint-John, New Brunswick

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.

Left image of stereo pair after rectification with ER9b.

Right image of stereo pair after rectification with ER9b.

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!

Depth map obtained with DMAG5b.

This is what I used for DMAG5b:

min disparity for image 1 = -55
max disparity for image 1 = 23
alpha = 0.9
truncation (color) = 30
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.

Occlusion map obtained with DMAG5b.

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!

Depth map improved by 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