Apply specified palette colors to a gray or binary image to set a single-channel image
Minimum Origin Version Required: 2022
1. fname$ =system.path.program$ + "Palettes\Rainbow.PAL"; cvPalette;
Please refer to the page for additional option switches when accessing the x-function from script
Input/Ouput
ImageLayer
Input
string
int
This function changes a gray or binary image into pseudo color image. The gray levels of the original image are mapped to different colors according to the specified palette file. Undo is supported.
See also img.Palette$ in LabTalk.
Example 1. Use Rainbow palette to color-mapping gray image
cvpalette -d;
Result is shown below.
The computation uses function from OpenCV Main API. Please refer to the OpenCV Main API Help file, Version 2.4.11.0 and read imgproc. Image Processing topic.
Kenneth R.Castleman.1996. Digital Image Processing. Prentice Hall, Upper Saddle River, NJ, USA.