Dynamic Conversion
Brief Description
Change the pixel type and rescale the image's dynamic
Tags
Image Manipulation, Conversion, Image Dynamic
Long Description
This application performs an image pixel type conversion (short, ushort, uchar, int, uint, float and double types are handled). The output image is written in the specified format (ie. that corresponds to the given extension).
The conversion can include a rescale of the data range, by default it's set between the 2nd to the 98th percentile. The rescale can be linear or log2.
The choice of the output channels can be done with the extended filename, but less easy to handle. To do this, a 'channels' parameter allows you to select the desired bands at the output. There are 3 modes, the available choices are:
* grayscale : to display mono image as standard color image
* rgb : select 3 bands in the input image (multi-bands)
* all : keep all bands.
Parameters
Input image (in): Input image
Output Image (out): Output image
Rescale type (type): Transfer function for the rescaling
Linear (linear):
Gamma correction factor (type.linear.gamma): Gamma correction factor
Log2 (log2):
Input mask (mask): Optional mask to indicate which pixels are valid for computing the histogram quantiles. Pixels where the mask is zero will not contribute to the histogram. The mask must have the same dimensions as the input image.
Histogram quantile cutting (quantile): Cut the histogram edges before rescaling
High cut quantile (quantile.high): Quantiles to cut from histogram high values before computing min/max rescaling (in percent, 2 by default)
Low cut quantile (quantile.low): Quantiles to cut from histogram low values before computing min/max rescaling (in percent, 2 by default)
Channels selection (channels): It's possible to select the channels of the output image. There are 3 modes, the available choices are:
Default mode (all): Select all bands in the input image, (1,...,n).
Grayscale mode (grayscale): Display single channel as standard color image.
Grayscale channel (channels.grayscale.channel):
RGB composition (rgb): Select 3 bands in the input image (multi-bands), by default (1,2,3).
Red Channel (channels.rgb.red): Red channel index.
Green Channel (channels.rgb.green): Green channel index.
Blue Channel (channels.rgb.blue): Blue channel index.
Output min value (outmin): Minimum value of the output image.
Output max value (outmax): Maximum value of the output image.
Available RAM (Mb) (ram): Available memory for processing (in MB)
Load otb application from xml file (inxml): Load otb application from xml file
Save otb application to xml file (outxml): Save otb application to xml file
Limitations
None
Authors
OTB-Team
See also
Convert, Rescale
Example of use
in: QB_Toulouse_Ortho_XS.tif
out: otbConvertWithScalingOutput.png
type: linear
channels: rgb
outmin: 0
outmax: 255
otbcli_DynamicConvert -in QB_Toulouse_Ortho_XS.tif -out otbConvertWithScalingOutput.png -type linear -channels rgb -outmin 0 -outmax 255