4.7.5 Stereo-rectification deformation grid generator

Generates two deformation fields to stereo-rectify (i.e. resample in epipolar geometry) a pair of stereo images up to the sensor model precision

Detailed description

This application generates a pair of deformation grid to stereo-rectify a pair of stereo images according to sensor modelling and a mean elevation hypothesis. The deformation grids can be passed to the StereoRectificationGridGenerator application for actual resampling in epipolar geometry.

Parameters

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





Parameter key

Parameter type

Parameter description




io

Group

Input and output data

io.inleft

Input image

Left input image

io.inright

Input image

Right input image

io.outleft

Output image

Left output deformation grid

io.outright

Output image

Right output deformation grid

epi

Group

Epipolar geometry and grid parameters

epi.elevation

Group

Elevation management

epi.elevation.dem

Directory

DEM directory

epi.elevation.geoid

Input File name

Geoid File

epi.elevation.default

Float

Default elevation

epi.elevation.avgdem

Group

Average elevation computed from DEM

epi.elevation.avgdem.step

Int

Sub-sampling step

epi.elevation.avgdem.value

Float

Average elevation value

epi.elevation.avgdem.mindisp

Float

Minimum disparity from DEM

epi.elevation.avgdem.maxdisp

Float

Maximum disparity from DEM

epi.scale

Float

Scale of epipolar images

epi.step

Int

Step of the deformation grid (in nb. of pixels)

epi.rectsizex

Int

Rectified image size X

epi.rectsizey

Int

Rectified image size Y

epi.baseline

Float

Mean baseline ratio

inverse

Group

Write inverse fields

inverse.outleft

Output image

Left inverse deformation grid

inverse.outright

Output image

Right inverse deformation grid

inverse.ssrate

Int

Sub-sampling rate for inversion

inxml

XML input parameters file

Load otb application from xml file

outxml

XML output parameters file

Save otb application to xml file











Table 4.112: Parameters table for Stereo-rectification deformation grid generator.

Input and output data This group of parameters allows setting the input and output images.

Epipolar geometry and grid parameters Parameters of the epipolar geometry and output grids

Write inverse fields This group of parameter allows generating the inverse fields as well

Load otb application from xml file Load otb application from xml file

Save otb application to xml file Save otb application to xml file

Example

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

otbcli_StereoRectificationGridGenerator -io.inleft wv2_xs_left.tif -io.inright wv2_xs_left.tif -io.outleft wv2_xs_left_epi_field.tif -io.outright wv2_xs_right_epi_field.tif -epi.elevation.default 400

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 StereoRectificationGridGenerator application 
StereoRectificationGridGenerator = otbApplication.Registry.CreateApplication("StereoRectificationGridGenerator") 
 
# The following lines set all the application parameters: 
StereoRectificationGridGenerator.SetParameterString("io.inleft", "wv2_xs_left.tif") 
 
StereoRectificationGridGenerator.SetParameterString("io.inright", "wv2_xs_left.tif") 
 
StereoRectificationGridGenerator.SetParameterString("io.outleft", "wv2_xs_left_epi_field.tif") 
 
StereoRectificationGridGenerator.SetParameterString("io.outright", "wv2_xs_right_epi_field.tif") 
 
StereoRectificationGridGenerator.SetParameterFloat("epi.elevation.default", 400) 
 
# The following line execute the application 
StereoRectificationGridGenerator.ExecuteAndWriteOutput()

Limitations

Generation of the deformation grid is not streamable, pay attention to this fact when setting the grid step.

Authors

This application has been written by OTB-Team.

See also

These additional ressources can be useful for further information: