2.6.4.8 imgRGBmerge(Pro)

Menu Information

Image: Conversion: RGB Merge

Brief Information

Merge RGB channel matrices to form a color image matrix

Additional Information

This feature is for OriginPro only.

Command Line Usage

1.imgRGBmerge r:=[Red]Msheet1 g:=[Green]Msheet1 b:=[Blue]Msheet1

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Source Image of Red r

Input

Image

Specifies the input image used as the red channel.

Source Image of Green g

Input

Image

Specifies the input image used as the green channel.

Source Image of Blue b

Input

Image

Specifies the input image used as the blue channel.

Output Image oimg

Output

Image

<new>

Specifies the output image. By default, a new image is created and used as output.

See the syntax here.

Description

The imgRGBmerge function merges the Red, Green and Blue channels to recombine a color image.

Merge.png

Examples

In this example, we use the imgRGBmerge function to recombine a color image from its RGB channels (the channel images are named Red, Green and Blue):

  1. Select Image: Conversion: RGB Merge. This opens the dialog of the X-Function.
  2. In the X-Function dialog, choose the images for the red, green and blue channels and click OK to close the dialog.
    ImgRGBmerge help English files image002.jpg
    A new image is created. It is the recombined color image.

Input Image

ImgRGBmerge help English files image004.jpg ImgRGBmerge help English files image006.jpg ImgRGBmerge help English files image008.jpg
Red channel image
Green channel image
Blue channel image

Output image

ImgRGBmerge help English files image010.jpg


Algorithm

In Origin, any pixel of a color image is represented by its red, green and blue components. To recombine an image from its red, green and blue channels, we just need to take each component from the color channels and combine them.

Related X-Functions

imgRGBsplit