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.
Source code: DMAG on github.
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.
I have recently try this software with L-R photos extracted from W3's MPO. After execute for a while it throws. May I have some hints on how to use it?
ReplyDeleteplease try to reduce the size of the images
DeleteHey, I was having issues with PNG images until I read this: reduce the size. Voila it's no longer throwing.
ReplyDeleteWhy PNG? Saving as a PNG generates a transparent background. With a flat image, edge to edge, no background will show. Saving as a simple, uncompressed jpg is best.
ReplyDeletePNG image generates transparency's if you apply the alpha option.
DeleteI just tried it. Fantastic! Thank you so much for writing this.
ReplyDelete