DisparityMapToElevationMap

将视差图投影到常规的高程图中。

描述

这个应用程序使用从立体图像对计算的视差图,在立体图像对覆盖的地面区域上生成高程图。

该应用程序是立体声重建管道的一部分。它可以在计算了视差图之后使用 BlockMatching

所需的输入是:视差图、立体对(在原始几何体中)和极线变形栅格。这些格线(计算方式 StereoRectificationGridGenerator )必须包含原始几何体(立体对)和对极几何体(视差图)之间的变换。每个视差的算法如下:

  • 如果位置被视差掩码丢弃,则跳过
  • 计算左侧光线:将当前位置从核线几何体变换为左侧传感器几何体(左侧校正栅格)
  • 计算右光线:用当前的视差移动当前位置,并从核线几何变换到右传感器(右校正栅格)
  • 估计左右光线之间的最佳3D相交
  • 对于获取的3D点的地面单元,如果其高程大于当前高程,则保持其高程(保持每个单元中所有3D点的最大高程)

此处的最小和最大高程设置用于限制重建的DEM。

参数

输入和输出数据

这组参数允许设置输入图像、输出图像和网格。

Input disparity map -io.in image Mandatory
The input disparity map (horizontal disparity in first band, vertical in second). This map can be computed by BlockMatching application.

Left sensor image -io.left image Mandatory
Left image in original (sensor) geometry. Only the geometric model of this image will be used, not the pixel values.

Right sensor image -io.right image Mandatory
Right image in original (sensor) geometry. Only the geometric model of this image will be used, not the pixel values.

Left Grid -io.lgrid image Mandatory
Left epipolar grid (deformation grid between left sensor et disparity spaces)

Right Grid -io.rgrid image Mandatory
Right epipolar grid (deformation grid between right sensor et disparity spaces)

Output elevation map -io.out image [dtype] Mandatory
Output elevation map in ground projection. Elevation values are in meters. Floating point pixel type are expected.

Disparity mask -io.mask image
Masked disparity pixels won't be projected (mask values equal to zero)


DEM step -step float Default value: 5
Spacing of the output elevation map (in meters)

Minimum elevation expected -hmin float Default value: 0
Minimum elevation expected (in meters)

Maximum elevation expected -hmax float Default value: 100
Maximum elevation expected (in meters)

高程管理

这组参数允许管理高程值。

DEM directory -elev.dem directory
This parameter allows selecting a directory containing Digital Elevation Model files. Note that this directory should contain only DEM files. Unexpected behaviour might occurs if other images are found in this directory. Input DEM tiles should be in a raster format supported by GDAL.

Geoid File -elev.geoid filename [dtype]
Use a geoid grid to get the height above the ellipsoid in case there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles. A version of the geoid can be found on the OTB website (egm96.grd and egm96.grd.hdr at https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/-/tree/master/Data/Input/DEM).

Default elevation -elev.default float Default value: 0
This parameter allows setting the default height above ellipsoid when there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles, and no geoid file has been set. This is also used by some application as an average elevation value.


Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).

实例

从命令行执行以下操作:

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

来自Python的评论:

import otbApplication

app = otbApplication.Registry.CreateApplication("DisparityMapToElevationMap")

app.SetParameterString("io.in", "disparity.tif")
app.SetParameterString("io.left", "sensor_left.tif")
app.SetParameterString("io.right", "sensor_right.tif")
app.SetParameterString("io.lgrid", "grid_epi_left.tif")
app.SetParameterString("io.rgrid", "grid_epi_right.tif")
app.SetParameterString("io.out", "dem.tif")

app.ExecuteAndWriteOutput()

局限性

极线变形网格应该能够完全存储在记忆中。