重新调整比例¶
此应用程序已弃用,并将在未来版本中删除。
在两个给定值之间重新缩放图像。
描述¶
此应用程序在两个给定值之间缩放给定的图像像素强度。默认情况下最小(分别为最大)值设置为0(分别255)。系统会自动计算所有图像带的输入最小值和最大值。
参数¶
Input Image -in image
Mandatory
The image to scale.
Output Image -out image [dtype]
Mandatory
The rescaled image filename.
Output min value -outmin float
Default value: 0
Minimum value of the output image.
Output max value -outmax float
Default value: 255
Maximum value of the output image.
Available RAM (MB) -ram int
Default value: 256
Available memory for processing (in MB).
实例¶
从命令行执行以下操作:
otbcli_Rescale -in QB_Toulouse_Ortho_PAN.tif -out rescaledImage.png uchar -outmin 0 -outmax 255
来自Python的评论:
import otbApplication
app = otbApplication.Registry.CreateApplication("Rescale")
app.SetParameterString("in", "QB_Toulouse_Ortho_PAN.tif")
app.SetParameterString("out", "rescaledImage.png")
app.SetParameterOutputImagePixelType("out", 1)
app.SetParameterFloat("outmin", 0)
app.SetParameterFloat("outmax", 255)
app.ExecuteAndWriteOutput()