Sunday, April 21, 2013

3D Photos - Rocks At The Beach

This is the left image of a stereo pair available at FinePix REAL 3D W3 sample 3D image & movies. Thanks Fuji!
This is the depth map obtained with Depth Map Automatic Generator (DMAG) using the default settings (number of scales = 0, downsampling factor = .75, smoothing parameter = 18).
Here's an animated 3D gif made up of (5) frames produced by Frame Sequence Generator (FSG).

Saturday, April 20, 2013

Frame Sequence Generator (FSG)

Frame Sequence Generator (FSG) generates intermediate frames (stereo synthetic views) given a reference image (must be image 2 in Depth Map Automatic Generator) and a depth map.

This is a very simplistic frame sequence generator as it only looks at one image and one depth map to generate the frames. Because of that, image 1 should not be used when creating an animated gif or a lenticular print (only use the generated frames and image 2). If you ask for three frames and your right image (image 2) is called somethingR.png, the program will generate and write three files named somethingR1.png, somethingR2.png, and somethingR3.png. The order in which the files should be used to generate a 3D animated gif or a lenticular is somethingR.png, somethingR1.png, somethingR2.png, and somethingR3.png. In other words, it goes from right to left.

The windows executable (guaranteed to be virus free) is available for free via the 3D Software Page. Please, refer to the 'Help->About' page in the actual program for how to use it.

Depth Map Automatic Generator (DMAG)

Depth Map Automatic Generator (DMAG) automatically generates a depth/disparity map given a stereo pair. The algorithm is based upon stereo matching variational methods in the context of optical flow.

DMAG is an implementation of the algorithm described in High Accuracy Optical Flow Estimation Based on a Theory for Warping by Thomas Brox, A. Bruhn, N. Papenberg, J. Weickert and Robust Optical Flow Estimation by Javier Sánchez Pérez, Nelson Monzón López, Agustín Salgado de la Nuez.

The only parameter to worry about is the smoothness parameter since it's the only parameter which, when changed, produces major differences in the resulting depth maps. If the depth map looks oversmoothed, the smoothness parameter should probably be decreased.

It is strongly recommended not to use images that are wider than 2,000 pixels since the CPU time spent becomes a real issue (as well as memory but to a much lesser extent). Reducing the number of (outer) iterations can certainly help in reducing the cpu time.

Here's an example:


Left image (image 1).



Right image (image 2).



Depth map obtained by DMAG.


Here's another example:


Left image (image 1).



Right image (image 2).



Depth map obtained by DMAG.


More details about DMAG can be found in Depth Map Generation using Optical Flow by Ugo Capeto.

The windows executable (guaranteed to be virus free) is available for free via the 3D Software Page. Please, refer to the 'Help->About' page in the actual program for how to use it.