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
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input Image | img |
Input/Ouput ImageLayer |
|
Specify the input image. It is also the destination of the output image. |
Palette File | fname |
Input string |
|
Select a palette. Refer to this page for how to add and manage color palettes in Origin. |
Undo | undo |
Input int |
Check this checkbox to support undo: 0 = false, 1 = true. |
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;
in the Command Window to open the dialog.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.