LineSegmentDetection

检测栅格中的线段

描述

这个应用程序检测图像中的局部直线轮廓。它基于Burns、Hanson和Riseman方法,并使用了一种相反的验证方法(Desolneux、Moisan和Morel)。该算法由Rafael Gromponevon Gioi、Jérémie JakuBowicz、Jean-Michel Morel和Gregory Randall发表。该方法计算图像的梯度线和水平线,并在直线支撑区检测对齐点。该应用程序允许在矢量数据中导出检测到的线。

参数

Input Image -in image Mandatory
将在其上检测线条的输入图像。
Output Detected lines -out vectorfile Mandatory
输出检测到的线段(矢量数据)。

高程管理

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

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.


No rescaling in [0, 255] -norescale bool Default value: false
By default, the input image amplitude is rescaled between [0,255]. Turn on this parameter to skip rescaling

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

实例

从命令行执行以下操作:

otbcli_LineSegmentDetection -in QB_Suburb.png -out LineSegmentDetection.shp

来自Python的评论:

import otbApplication

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

app.SetParameterString("in", "QB_Suburb.png")
app.SetParameterString("out", "LineSegmentDetection.shp")

app.ExecuteAndWriteOutput()

另请参阅

此处提供了LSD算法的在线演示:http://www.ipol.im/pub/algo/gjmr_line_segment_detector/