Rescale¶
Rescale the image between two given values.
Description¶
This application scales the given image pixel intensity between two given values. By default min (resp. max) value is set to 0 (resp. 255). Input minimum and maximum values is automatically computed for all image bands.
Parameters¶
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).
Load parameters from XML -inxml filename.xml
Load application parameters from an XML file.
Save parameters to XML -outxml filename.xml
Save application parameters to an XML file.
Examples¶
From the command-line:
otbcli_Rescale -in QB_Toulouse_Ortho_PAN.tif -out rescaledImage.png uchar -outmin 0 -outmax 255
From 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()