
Contents |
RGB Split
Split color image into R,G, B channels
This feature is for OriginPro only.
1. imgRGBsplit img:=[Mbook1]Msheet1!Mat(1);
2. imgRGBsplit img:=mat(1) r:=mat(2) g:=mat(3) b:=mat(4) colorize:=1;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input Matrix | img |
Input Image | |
Specifies the source image to manipulate. The default input is the active image. |
| Red Image | r |
Output Image | |
Specifies the output image for the red channel. By default, an image named red will be used. See the syntax here. |
| Green Image | g |
Output Image | |
Specifies the output image for the green channel. By default, an image named green will be used. See the syntax here. |
| Blue Image | b |
Output Image | |
Specifies the output image for the blue channel. By default, an image named blue will be used. See the syntax here. |
| Colorize | colorize |
Input int | |
Specifies whether to colorize the output images. If it is set to 1, the output images will be colorized, using palettes. |
The imgRGBsplit function splits the input color image into red, green and blue channels, allowing you to analyze or process the color channels separately.
In this example, we use the imgRGBsplit function to split the R, G, B channels of the input image:

Input Image
Red Channel Image
Green Channel Image
Blue Channel Image
In Origin, each pixel of a color image is represented by its R, G, B component. For splitting the color channels, we only need to separate the components for each channel.
If you choose to colorize the channel images, palettes will be used to apply pseudocolor to the channel images.