HomologousPointsExtraction¶
使用关键点计算图像之间的同源点
描述¶
这个应用程序使用关键点计算图像之间的同源点。可以使用SIFT或SURF关键点,并且可以为这两个图像单独设置计算关键点的频段。该应用程序提供两种模式:第一种模式是从两个图像的全图中提取关键点(请注意,在此模式下不支持大图像文件)。第二种模式称为Geobins,它允许用户设置空间分格,以减少散布在整个图像上的点数。在这种模式下,使用地理变换或传感器建模来估计第二幅图像中对应的空间面元,并根据用户定义的精度进行填充。最后,在这两种模式下,应用程序都可以过滤在第一张图像中定位超过此精度的匹配项。高程参数是为了在传感器几何数据的情况下更精确地处理传感器建模。输出向量选项允许创建具有与匹配之间的本地化误差相对应的段的向量文件。例如,评估登记的精确度可能是有用的。矢量文件始终重新投影到EPSG:4326,以便可以在GIS中显示。这可以通过重新投影或应用图像传感器模型来实现。
参数¶
- Input Image 1
-in1 image
Mandatory - 第一个输入图像
Input band 1 -band1 int
Default value: 1
Index of the band from input image 1 to use for keypoints extraction
- Input Image 2
-in2 image
Mandatory - 第二个输入图像
Input band 2 -band2 int
Default value: 1
Index of the band from input image 1 to use for keypoints extraction
Output file with tie points -out filename [dtype]
Mandatory
File containing the list of tie points
Output vector file with tie points -outvector filename [dtype]
File containing segments representing matches
Keypoints detection algorithm -algorithm [surf|sift]
Default value: surf
Choice of the detection algorithm to use
- SURF algorithm
- SIFT algorithm
Distance threshold for matching -threshold float
Default value: 0.6
The distance threshold for matching.
Use back-matching to filter matches -backmatching bool
Default value: false
If set to true, matches should be consistent in both ways.
Keypoints search mode -mode [full|geobins]
Default value: full
- Extract and match all keypoints (no streaming)
Extract and match all keypoints, loading both images entirely into memory - Search keypoints in small spatial bins regularly spread across first image
This method retrieves a set of tie points regularly spread across image 1. Corresponding bins in image 2 are retrieved using sensor and geographical information if available. The first bin position takes into account the margin parameter. Bins are cropped to the largest image region shrunk by the margin parameter for both in1 and in2 images.
小空间框中的搜索关键点有规律地分布在第一个图像选项中¶
Size of bin -mode.geobins.binsize int
Default value: 256
Radius of the spatial bin in pixels
Size of bin (y direction) -mode.geobins.binsizey int
Radius of the spatial bin in pixels (y direction). If not set, the mode.geobins.binsize value is used.
Steps between bins -mode.geobins.binstep int
Default value: 256
Steps between bins in pixels
Steps between bins (y direction) -mode.geobins.binstepy int
Steps between bins in pixels (y direction). If not set, the mode.geobins.binstep value is used.
Margin from image border to start/end bins (in pixels) -mode.geobins.margin int
Default value: 10
Margin from image border to start/end bins (in pixels)
Estimated precision of the colocalisation function (in pixels) -precision float
Default value: 0
Estimated precision of the colocalisation function in pixels
Filter points according to geographical or sensor based colocalisation -mfilter bool
Default value: false
If enabled, this option allows one to filter matches according to colocalisation from sensor or geographical information, using the given tolerancy expressed in pixels
If enabled, points from second image will be exported in WGS84 -2wgs84 bool
Default value: false
高程管理¶
这组参数允许管理高程值。
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.
实例¶
从命令行执行以下操作:
otbcli_HomologousPointsExtraction -in1 sensor_stereo_left.tif -in2 sensor_stereo_right.tif -mode full -out homologous.txt
来自Python的评论:
import otbApplication
app = otbApplication.Registry.CreateApplication("HomologousPointsExtraction")
app.SetParameterString("in1", "sensor_stereo_left.tif")
app.SetParameterString("in2", "sensor_stereo_right.tif")
app.SetParameterString("mode","full")
app.SetParameterString("out", "homologous.txt")
app.ExecuteAndWriteOutput()
局限性¶
完全模式不处理大图像。