mergecv
Merges specified RGB/RGBA channels into a single image.
Syntax
handle = mergecv(r, g, b)
handle = mergecv(r, g, b, a)
Inputs
- r
- Handle of the single channel image or a real, 2D matrix representing the red channel. An empty matrix ([]) can be used to supress red channel in handle.
- g
- Handle of the single channel image or a real, 2D matrix representing the green channel. An empty matrix ([]) can be used to supress green channel in handle.
- b
- Handle of the single channel image or a real, 2D matrix representing the blue channel. An empty matrix ([]) can be used to supress blue channel in handle.
- a
- Handle of the single channel image or a real, 2D matrix representing the alpha channel. An empty matrix ([]) can be used to supress alpha channel in handle.
Outputs
- handle
- Handle of the merged image.
Examples
cvhandle = imreadcv('image1.jpg');
[r, g, b] = splitcv(cvhandle);
mergedhandle = mergecv(r, g, b);
cvhandle = imreadcv('image1.jpg');
[r, g, b] = splitcv(cvhandle);
mergedhandle = mergecv(r, [], []); % Shows only the red channel
cvhandle = imreadcv('image1.jpg');
[r, g, b] = splitcv(cvhandle);
imsize = imsizecv(r);
mergedhandle = mergecv(r, ones(imsize(1),imsize(2)), []);