Splits a three channel image into R, G and B channels
Function
CuviStatus channelSplit(const CuviImage& src,
CuviImage& red,
CuviImage& green,
CuviImage& blue,
const CuviStream& stream = CuviStream());
|
Parameters
| Name
|
Type
|
Description
|
| src
|
const CuviImage&
|
3-channel input Image
|
| red
|
CuviImage&
|
Output red channel image
|
| green
|
CuviImage&
|
Output green channel image
|
| blue
|
CuviImage&
|
Output blue channel image
|
| stream
|
const CuviStream&
|
GPU stream ID for execution
|
|
Image Type Support
| Input
|
Output
|
| 8uC3
|
8uC1 x 3
|
| 16uC3
|
16uC1 x 3
|
| 32fC3
|
32fC1 x 3
|
|
Sample
Input Image
|
Red Channel
|
Green Channel
|
Blue Channel
|
Example
//A single color image
CuviImage gimg = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_COLOR);
//Three single channel images for storing output
CuviImage gr, gg, gb;
//Split into R, G and B channels
CuviStatus st = cuvi::colorOperations::channelSplit(gimg,gr,gg,gb);
|