Tuesday, November 22, 2016

3D Photos - At the station (2)


This is the original stereo pair taken by mediavr with a w3. Image size is 1824x1368 pixels. Generating a depth map is going to be difficult because of the low texture in certain parts of the image and the lack of clear separation (color-wise) between foreground and background in some places.


This is the rectified stereo pair (by er9b). The advantage of using er9b beside rectifying is that it gives you the min and max disparities as a bonus.


This is the depth map obtained by dmag5.

Parameters used for dmag5:

image 1 = ../image_l.png
image 2 = ../image_r.png
min disparity for image 1 = -82
max disparity for image 1 = -30
disparity map for image 1 = depthmap_l.jpg
disparity map for image 2 = depthmap_r.jpg
occluded pixel map for image 1 = occmap_l.jpg
occluded pixel map for image 2 = occmap_r.jpg
radius = 32
alpha = 0.9
truncation (color) = 30
truncation (gradient) = 10
epsilon = 255^2*10^-4
disparity tolerance = 0
radius to smooth occlusions = 9
sigma_space = 9
sigma_color = 25.5
downsampling factor = 2

Fair to say that it is not the greatest depth map and it would be nice to improve upon it with some post-processing (has to be automatic though). We are gonna use dmag9b to improve the quality of the depth map auto-magically.


This is the depth map obtained by dmag9b.

Input to dmag9b:

reference image = ../../image_l.png
input disparity map = ../depthmap_l.jpg
sample_rate_spatial = 32
sample_rate_range = 8
lambda = 0.25
hash_table_size = 100000
nbr of iterations (linear solver) = 25
sigma_gm = 1.4142
nbr of iterations (irls) = 32
radius (confidence map) = 12
gamma proximity (confidence map) = 12
gamma color similarity (confidence map) = 12
sigma (confidence map) = 0.25
output depth map image = depthmap_l_dmag9b.jpg

Let's change the "sample rate range" to 4 leaving everything else the same ...


This is the depth map obtained by dmag9b.

Input to dmag9b:

reference image = ../../image_l.png
input disparity map = ../depthmap_l.jpg
sample_rate_spatial = 32
sample_rate_range = 4
lambda = 0.25
hash_table_size = 100000
nbr of iterations (linear solver) = 25
sigma_gm = 1.4142
nbr of iterations (irls) = 32
radius (confidence map) = 12
gamma proximity (confidence map) = 12
gamma color similarity (confidence map) = 12
sigma (confidence map) = 0.25
output depth map image = depthmap_l_dmag9b.jpg

In my opinion, a better depth map than the previous one. Let's change the "sample rate spatial" to 4 leaving everything else the same ...


This is the depth map obtained by dmag9b.

Input to dmag9b:

reference image = ../../image_l.png
input disparity map = ../depthmap_l.jpg
sample_rate_spatial = 4
sample_rate_range = 4
lambda = 0.25
hash_table_size = 100000
nbr of iterations (linear solver) = 25
sigma_gm = 1.4142
nbr of iterations (irls) = 32
radius (confidence map) = 12
gamma proximity (confidence map) = 12
gamma color similarity (confidence map) = 12
sigma (confidence map) = 0.25
output depth map image = depthmap_l_dmag9b.jpg

In my opinion, a worse depth map than the previous two because much too similar to the depth map produced by dmag5.


This is the confidence map that was used by dmag9b. Of course, it is generated automatically by dmag9b. The black areas correspond to areas of low confidence in the depth values. They basically correspond to abrupt changes in depth values.

No comments:

Post a Comment