Color Mapping
Brief Description
Maps an input grayscale image into 8-bits RGB using look-up tables.
Tags
Learning
Long Description
This application allows to map an input grayscale into a 8-bits RGB image using three different methods. -The custom method allows to apply a custom look-up table to a labeled image. The look-up table is loaded from a text file where each line describes an entry. The typical use of this method is to colorise a classification map. -The continuous method allows to map a range of values in a scalar input image into a colored image using continuous look-up table, in order to enhance image interpretation. Several look-up tables can ben chosen with different color ranges. -The segmentation method is dedicated to segmentation labeled outputs where each segment correspond to a unique labeled. It computes an optimal look-up table such that color difference between adjacent segmented regions is maximised.
Parameters
[param] Input Image (-in): Input image filename
[param] Output Image (-out): Output image filename
[param] Available RAM (-ram): Available RAM
[choice] Color mapping method (-method): Selection of color mapping methods and their parameters.
[group] Color mapping with custom labeled look-up table: Apply a user-defined look-up table to a labeled image. Look-up table is loaded from a text file.
[param] Look-up table file (-lut): An ASCII file containing the look-up table with one color per line (for instance the line '1 255 0 0' means that all pixels with label 1 will be replaced by RGB color 255 0 0) Lines beginning with a # are ignored
[group] Color mapping with continuous look-up table: Apply a continuous look-up table to a range of input values.
[choice] Look-up tables (-lut): Available look-up tables.
[group] Red:
[group] Green:
[group] Blue:
[group] Grey:
[group] Hot:
[group] Cool:
[group] Spring:
[group] Summer:
[group] Autumn:
[group] Winter:
[group] Copper:
[group] Jet:
[group] HSV:
[group] OverUnder:
[group] Relief:
[param] Mapping range lower value (-min): Set the lower input value of the mapping range.
[param] Mapping range higher value (-max): Set the higher input value of the mapping range.
[group] Color mapping with a look-up table optimised for segmentation: Compute an optimal look-up table such that neighbouring labels in a segmentation are mapped to highly contrasted colors.
[param] Background label (-background): Value of the background label
Limitations
The segmentation method does not support streaming, and thus large images.
Authors
OTB-Team
See also
ImageSVMClassifier application
Example of use
Input Image: clLabeledImageQB123_1.tif
Output Image: clLabeledFancyImageQB123_1.tif
Color mapping method: custom
Look-up table file: Classification/ColorTable.txt
otbcli_ColorMapping -in clLabeledImageQB123_1.tif -out clLabeledFancyImageQB123_1.tif -method custom -method.custom.lut Classification/ColorTable.txt