Image conversion generally includes converting a color image to a gray or binary one, splitting and merging the RGB color channels, and using the image palette to apply pseudo color to a gray image.
If the intensity of a color image is the only interested, it is useful to convert the color image to gray scale to reduce calculate complex. Moreover, some input/output devices like monochrome printers or monochrome display, can only handle gray-scale images. In this case, converting color to gray scale is necessary.
Convert a Color Image into Gray Scale,
| Original Image | Gray Scale Image |
|---|---|
|
|
A gray scale image can be color-mapped to a palette. Pseudo color does not add additional information to the original image. However, it helps to make some details more visible to human eyes. It is commonly used for viewing sensor images, such as satellite images and Magnetic Resonance Imaging.
| Original Image | Image with a Palette |
|---|---|
|
|
To Map a Color Palette to a Cray Scale Image,
OR,
cvPalette -d;
in the Command Window (Window: Command Window or Shift+ALT+3) to open the cvPalette dialog.You can click Revise Palette button |
A color image can be spitted into its Red, Green, and Blue color channels. Then you can process each channel separately and recombine them into a new color image. This feature is especially useful when the object you want to process is only located in or easily extracted from one channel.
To split a color image into R, G, B channels

To merge RGB channels to reconstruct a color image

| Note: The image is split/merged in the Chanel Order you specify here. Different order will lead to different results. |
