# BlockMatching

## Brief Description

Performs block-matching to estimate pixel-wise disparities between two images

## Tags

Stereo

## Long Description

This application allows one to performs block-matching to estimate pixel-wise disparities between two images. One must chose block-matching method and input masks (related to the left and right input image) of pixels for which the disparity should be investigated. Additionally, two criteria can be optionally used to disable disparity investigation for some pixel: a no-data value, and a threshold on the local variance. This allows one to speed-up computation by avoiding to investigate disparities that will not be reliable anyway. For efficiency reasons, if the optimal metric values image is desired, it will be concatenated to the output image (which will then have three bands : horizontal disparity, vertical disparity and metric value). One can split these images afterward.

## Parameters

- [param] -io <string> This group of parameters allows setting the input and output images.. Mandatory: True. Default Value: "0"
- [param] -mask <string> This group of parameters allows determining the masking parameters to prevent disparities estimation for some pixels of the left image. Mandatory: True. Default Value: "0"
- [param] -bm <string> This group of parameters allow tuning the block-matching behaviour. Mandatory: True. Default Value: "0"
- [param] -ram <int32> Available memory for processing (in MB). Mandatory: False. Default Value: "128"
- [param] -inxml <string> Load otb application from xml file. Mandatory: False. Default Value: ""
- [param] -outxml <string> Save otb application to xml file. Mandatory: False. Default Value: ""

## Limitations

None

## Authors

OTB-Team

## See Also

otbStereoRectificationGridGenerator

## Example of use

- io.inleft: StereoFixed.png

- io.inright: StereoMoving.png

- bm.minhd: -10

- bm.maxhd: 10

- mask.variancet: 10

- io.out: MyDisparity.tif