Friday, October 16, 2015

3D Photos - At the park

In this post, I want to demonstrate how you can easily fix a depth map with Depth Map Automatic Generator 4 (DMAG4), the depth map generator that's usually used for 2d to 3d image conversion.


Left image.


Right image.


This is the depth map produced by Depth Map Automatic Generator 7 (DMAG7) using the following parameters: min disparity = -15, max disparity = 0, spatial sample rate = 8, range spatial rate = 16, patch radius = 7, lambda = 0.01, max L-BFGS iterations = 1,000, hash table size = 10,000.


This is the depth map smoothed by Edge Preserving Smoothing 7 (EPS7) using the following parameters: spatial standard deviation = 100, range spatial deviation = 100, and number of iterations = 3.


This is the animated gif produced by Wiggle Maker. As you can plainly see, the depth map has a few problems, like where the fencing is located in the background. We're gonna erase the bad areas and have DMAG4 "fill in the blanks" (the easy way and the slightly less easy way).

Easy way:


This is the depth map after having loosely erased problem areas. This was done in gimp using the eraser tool (with hard edge checked). Make sure that when you erase, you can see the checkerboard pattern, which indicates that the depth map has a transparency channel. If you don't see the checkerboard pattern, export the depth map in a format that allows for a transparency channel like png and work on that depth map instead.


This is the depth map produced by Depth Map Automatic Generator 4 (DMAG4).

Slightly less easy way:

We are gonna scribble some depths in the transparent areas of the depth map prior to giving it to DMAG4.


This the depth map scribbled over.


This is how the scribbling looks in Gimp. The process is pretty simple: 1) load up the reference image (left image), load up the depth map as new layer (it will go on top and we're gonna be able to see the reference image underneath in the transparent areas), scribble hint depths in the transparent areas of the depth map, and export the depth map layer.


This is the depth map produced by Depth Map Automatic Generator 4 (DMAG4).


This is the animated gif produced by Wiggle Maker. Much better, I think.

No comments:

Post a Comment