2.6.4.9 imgRGBsplit(Pro)
Contents
Menu Information
Image: Conversion: RGB Split
Brief Information
Split color image into RGB channels
Additional Information
This feature is for OriginPro only.
Command Line Usage
1. imgRGBsplit img:=[Mbook1]Msheet1!Mat(1);
2. imgRGBsplit img:=mat(1) r:=mat(2) g:=mat(3) b:=mat(4) colorize:=1;
X-Function Execution Options
Variables
| 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 . |
| 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 . |
| 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 . |
| 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. |
Description
Examples
In this example, we use the imgRGBsplit function to split the R, G, B channels of the input image:
- When the input image is active, select Image: Conversion: RGB Split. This opens the dialog of the X-Function.
- In the X-Function dialog, change the settings as the screenshot below and click OK to close the dialog.
Three new images are created. They are the channel images for the input image.
Input Image
Output Image
Note: OriginPro includes the ability to automatically recalculate the analysis results of the RGB Split and RGB Merge operations any time you change the parameters or update your source data. In addition, the settings for the analysis routine can be saved to an analysis theme for use later with similar data.
Algorithm
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.
Related X-Functions
,