splitcv

Splits an image into RGB/RGBA channels.

Syntax

[r, g, b] = splitcv(cvhandle)

[r, g, b, a] = splitcv(cvhandle)

Inputs

cvhandle
Handle of a color image.
Type: integer

Outputs

r
Handle of the single channel image representing the red channel data.
Type: integer
g
Handle of the single channel image representing the green channel data.
Type: integer
b
Handle of the single channel image representing the blue channel data.
Type: integer
a
Handle of the single channel image representing the alpha channel data, if applicable.
Type: integer

Example

Split an image into RGB channels:

cvhandle = imreadcv('image1.jpg');
[r, g, b] = splitcv(cvhandle);