4.7.2 Disparity map to elevation map

Projects a disparity map into a regular elevation map

Detailed description

This application uses a disparity map computed from a stereo image pair to produce an elevation map on the ground area covered by the stereo pair. The needed inputs are : the disparity map, the stereo pair (in original geometry) and the epipolar deformation grids. These grids have to link the original geometry (stereo pair) and the epipolar geometry (disparity map).

Parameters

This section describes in details the parameters available for this application. Table 4.39, page 454 presents a summary of these parameters and the parameters keys to be used in command-line and programming languages. Application key is DisparityMapToElevationMap.





Parameter key

Parameter type

Parameter description




io

Group

Input and output data

io.in

Input image

Input disparity map

io.left

Input image

Left sensor image

io.right

Input image

Right sensor image

io.lgrid

Input image

Left Grid

io.rgrid

Input image

Right Grid

io.out

Output image

Output elevation map

io.mask

Input image

Disparity mask

step

Float

DEM step

hmin

Float

Minimum elevation expected

hmax

Float

Maximum elevation expected

elev

Choices

Elevation management

elev dem

Choice

DEM directory

elev average

Choice

Average Elevation

elev.dem.path

Directory

DEM directory

elev.dem.geoid

Input File name

Geoid File

elev.average.value

Float

Average Elevation

ram

Int

Available RAM (Mb)





Table 4.39: Parameters table for Disparity map to elevation map.

Input and output data This group of parameters allows to set the input and output images and grids.

DEM step Spacing of the output elevation map (in meters)

Minimum elevation expected Minimum elevation expected (in meters)

Maximum elevation expected Maximum elevation expected (in meters)

Elevation management This group of parameters allows to manage elevation values. Supported formats are SRTM, DTED or any geotiff processed by the DEM import application Available choices are:

Available RAM (Mb) Available memory for processing (in MB)

Example

To run this example in command-line, use the following:

otbcli_DisparityMapToElevationMap -io.in disparity.tif -io.left sensor_left.tif -io.right sensor_right.tif -io.lgrid grid_epi_left.tif -io.rgrid grid_epi_right.tif -io.out dem.tif

To run this example from Python, use the following code snippet:

#!/usr/bin/python 
 
# Import the otb applications package 
import otbApplication 
 
# The following line creates an instance of the DisparityMapToElevationMap application 
DisparityMapToElevationMap = otbApplication.Registry.CreateApplication("DisparityMapToElevationMap") 
 
# The following lines set all the application parameters: 
DisparityMapToElevationMap.SetParameterString("io.in", "disparity.tif") 
 
DisparityMapToElevationMap.SetParameterString("io.left", "sensor_left.tif") 
 
DisparityMapToElevationMap.SetParameterString("io.right", "sensor_right.tif") 
 
DisparityMapToElevationMap.SetParameterString("io.lgrid", "grid_epi_left.tif") 
 
DisparityMapToElevationMap.SetParameterString("io.rgrid", "grid_epi_right.tif") 
 
DisparityMapToElevationMap.SetParameterString("io.out", "dem.tif") 
 
# The following line execute the application 
DisparityMapToElevationMap.ExecuteAndWriteOutput()

Limitations

None

Authors

This application has been written by OTB-Team.

See also

These additional ressources can be useful for further information: