马赛克¶
执行输入图像的马赛克
描述¶
此应用程序执行输入图像的镶嵌
参数¶
Input Images -il image1 image2...
Mandatory
Input images to mosaic
Input VectorData for composition -vdcut vectorfile1 vectorfile2...
VectorData files to be used for cut input images. Must be provided in the same order as the input images.
Input VectorData for statistics -vdstats vectorfile1 vectorfile2...
VectorData files to be used for statistics computation (harmonization). Must be provided in the same order as the input images.
马赛克合成模式¶
这组参数设置镶嵌合成
Feathering method -comp.feather [none|large|slim]
Default value: none
Set the feathering method for composition
- Simple compositing method
No feathering method is used. Copies the last image over earlier ones in areas of overlap - The large blending composition mode
Blends all images on the maximum overlapping areas (this produces seamless mosaics, but can cause blur effect where images are not perfectly aligned) - The slim blending composition mode
Blends the last image over earlier ones in areas of overlap, on a given transition distance (seam can be visible from a certain zoom level, but it does not cause blur effect when images are not perfectly aligned)
超薄混合合成模式选项¶
Transition smoothness (1.0 = linear transition) -comp.feather.slim.exponent float
Default value: 1
Transition length (In cartographic units) -comp.feather.slim.length float
光谱波段协调模式¶
这组参数可用于设置镶嵌协调方法
harmonization method -harmo.method [none|band|rgb]
Default value: none
Set the harmonization method. More information about the "band" and "rgb" methods can be found in the paper "Natural Color Satellite Image Mosaicking Using Quadratic Programming in Decorrelated Color Space" Cresson and Saint-Geours, July 2015, IEEE JSTARS Volume 8 Issue 8 (https://doi.org/10.1109/JSTARS.2015.2449233)
- None
No automatic harmonization is done - Spectral bands
Consists in minimizing a cost function based on images statistics in overlapping areas, for each band independently - True colors
Consists in minimizing a cost function based on images statistics in overlapping areas, in a decorreleted color space suitable for true color processing (works only on true color images, i.e. RGB). Only the first 3 bands are processed by this method.
harmonization cost function -harmo.cost [rmse|musig|mu]
Default value: rmse
Set the harmonization cost function
- Root mean squared error based cost function
- Mean and Standard deviation based cost function
- Mean based cost function
Output image -out image [dtype]
Mandatory
Output image, resulting from the mosaicing process.
Interpolation -interpolator [nn|bco|linear]
Default value: nn
This group of parameters allows defining how the input image will be interpolated during resampling.
- Nearest Neighbor interpolation
Nearest neighbor interpolation leads to poor image quality, but it is fast. - Bicubic interpolation
Bicubic interpolation leads to great image quality, but it is slow. - Linear interpolation
Linear interpolation leads to average image quality but is quite fast
双三次插值选项¶
Radius for bicubic interpolation -interpolator.bco.radius int
Default value: 2
Size of the bicubic interpolation filter. If the target pixel size is higher than the input pixel size, increasing this parameter will reduce aliasing artefacts.
输出图像网格¶
输出镶嵌像素格网参数
Pixel Size (X) -output.spacingx float
Physical size (X) of output image pixels, in cartographic units.
Pixel Size (Y) -output.spacingy float
Physical size (Y) of output image pixels, in cartographic units..
Directory for temporary files -tmpdir directory
Directory for temporary files. If not set, the output image parent directory is used.
距离图计算¶
Distance maps sampling ratio -distancemap.sr float
Default value: 10
Distance maps are computed when the compositing method uses feathering. The distance maps sampling ratio is the ratio between the distance map physical spacing and the physical spacing of the original image. It is used to change the distance maps physical spacing: since the distance map computation is not a streamable pipeline, it can be useful to compute slightly smaller distance maps. distancemap.sr can be hence increased if input images are too big to fit the RAM, or in order to speed up the process
no-data value -nodata float
Default value: 0
The no-data value is ignored during statistics computations (for color harmonisation) and for the mosaic compositing.
Available RAM (MB) -ram int
Default value: 256
Available memory for processing (in MB).
实例¶
从命令行执行以下操作:
otbcli_Mosaic -il SP67_FR_subset_1.tif SP67_FR_subset_2.tif -out mosaicImage.tif
来自Python的评论:
import otbApplication
app = otbApplication.Registry.CreateApplication("Mosaic")
app.SetParameterStringList("il", ['SP67_FR_subset_1.tif', 'SP67_FR_subset_2.tif'])
app.SetParameterString("out", "mosaicImage.tif")
app.ExecuteAndWriteOutput()
局限性¶
- 当“comp”参数不同于“None”时,可以调整距离图计算的采样率,以使输入图像适合内存(距离图计算不可流传输)。当“haramo”方法不是“None”时,一种算法使用二次规划(QP)来执行输入图像的色彩协调。QP的目标函数是一组矩阵,每个矩阵的大小为N×N(N是输入图像的数量)。因此,大量输入图像意味着这些矩阵适合存储,这与应用程序(ram参数)的流传输能力无关,而是协调过程的固有特性。