Sunday, May 25, 2014

Depth Map Automatic Generator 5b (DMAG5b)

DMAG5b is a variant of Depth Map Automatic Generator 5 where the smoothing of the raw cost is performed without preserving the edges of the reference/guide image (it's a simple averaging). This means that DMAG5b is reduced to a winner-takes-all window-based stereo matcher. This type of stereo matching algorithms have a tendency to fatten object boundaries as the window radius increases. They can however be extremely accurate within objects.

Let's go over the parameters that control DMAG5's behavior:
- Minimum disparity is the disparity corresponding to the furthest point in the background.
- Maximum disparity is the disparity corresponding to the closest point in the foreground.
I suggest using Disparity Finder 2 (DF2) to get the minimum and maximum disparity.
- Window radius is the window size. The larger the radius, the more accurate the matches are supposed to be (to a certain extent). If the window radius becomes too large, errors are likely to appear at object boundaries.
- Alpha is the term that balances the color matching cost and the gradient matching cost. The closer alpha is to 0, the more importance is given to the color. The closer alpha is to 1, the more importance is given to the gradient. In theory, a higher alpha works better when there's quite a bit of texture in the image while a lower alpha works better when the image is relatively flat color wise.
- Truncation value (color) limits the value the color matching cost can take. It reduces the effects of occluded pixels (Pixels that appear in only one image.)
- Truncation value (gradient) limits the value the gradient matching cost can take. It reduces the effects of occluded pixels.
In theory, depth map quality is supposed to increase with the thresholds but only to a certain point (If the thresholds are increased too much, quality actually degrades.)
- Disparity tolerance (occlusion detection). The larger the value, the more mismatch is allowed (between left and right depth maps) before declaring that the disparity computed at a pixel is wrong. Obviously, the larger the value, the less black the occlusion map will look.
- Window radius (occlusion smoothing)
- Sigma space (occlusion smoothing)
- Sigma color (occlusion smoothing)

Here's an example:


Depth map obtained by DMAG5b for the Tsukuba stereo pair using a small radius.


Depth map obtained by DMAG5b for the Tsukuba stereo pair using a large radius.

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.

2 comments:

  1. hi,I don't quite understand the difference between DMAG5and DMAG5b, can you explain it to me,what is the difference?

    ReplyDelete
    Replies
    1. dmag5 takes into account change of colors when estimating the depth, that is, objects that have different colors are assumed to be at possibly different depths. dmag5b doesn't. dmag5b is much simpler than dmag5 and much faster as well. dmag5b works best when the there is not much parallax in your stereo pair, that is, it works best if the picture was taken with a small baseline (distance between the lenses).

      Delete