# StereoFramework

## Brief Description

Compute the ground elevation based on one or multiple stereo pair(s)

## Tags

Stereo

## Long Description

Compute the ground elevation with a stereo block matching algorithm between one or mulitple stereo pair in sensor geometry. The output is projected in desired geographic or cartographic map projection (UTM by default). The pipeline is made of the following steps: for each sensor pair : - compute the epipolar displacement grids from the stereo pair (direct and inverse) - resample the stereo pair into epipolar geometry using BCO interpolation - create masks for each epipolar image : remove black borders and resample input masks - compute horizontal disparities with a block matching algorithm - refine disparities to sub-pixel precision with a dichotomy algorithm - apply an optional median filter - filter disparities based on the correlation score and exploration bounds - translate disparities in sensor geometry convert disparity to 3D Map. Then fuse all 3D maps to produce DSM.

## Parameters

- [param] -input <string> This group of parameters allows parametrizing input data.. Mandatory: True. Default Value: "0"
- [param] -elev <string> This group of parameters allows managing elevation values. Supported formats are SRTM, DTED or any geotiff. DownloadSRTMTiles application could be a useful tool to list/download tiles related to a product.. Mandatory: True. Default Value: "0"
- [param] -output <string> This group of parameters allows choosing the DSM resolution, nodata value, and projection parameters.. Mandatory: True. Default Value: "0"
- [param] -stereorect <string> This group of parameters allows choosing direct and inverse grid subsampling. These parameters are very useful to tune time and memory consumption.. Mandatory: True. Default Value: "0"
- [param] -bm <string> This group of parameters allow tuning the block-matching behavior. Mandatory: True. Default Value: "0"
- [param] -postproc <string> This group of parameters allow use optional filters.. Mandatory: True. Default Value: "0"
- [param] -mask <string> . 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: ""
[choice] -map Parameters of the output map projection to be used. utm,lambert2,lambert93,wgs,epsg. Mandatory: True. Default Value: "wgs"

- [group] -utm

- [param] -map.utm.zone <int32> The zone number ranges from 1 to 60 and allows defining the transverse mercator projection (along with the hemisphere). Mandatory: True. Default Value: "31"
- [param] -map.utm.northhem <boolean> The transverse mercator projections are defined by their zone number as well as the hemisphere. Activate this parameter if your image is in the northern hemisphere.. Mandatory: False. Default Value: "True"

- [group] -lambert2

- [group] -lambert93

- [group] -wgs

- [group] -epsg

- [param] -map.epsg.code <int32> See www.spatialreference.org to find which EPSG code is associated to your projection. Mandatory: True. Default Value: "4326"

## Limitations

## Authors

OTB-Team

## See Also

## Example of use

- input.il: sensor_stereo_left.tif sensor_stereo_right.tif

- elev.default: 200

- stereorect.fwdgridstep: 8

- stereorect.invgridssrate: 4

- postproc.med: 1

- output.res: 2.5

- output.out: dem.tif