|
|
| Line 64: |
Line 64: |
| |} | | |} |
|
| |
|
| ===Sample=== | | ====Sample==== |
| {|
| | [[File:Splitin.jpg|frame|Input Image]] |
| |-
| | <br/> |
| |[[File:Splitin.jpg|frame|Input Image]]
| | [[File:Splitred.jpg|frame|Red Channel]] |
| |[[File:Splitred.jpg|frame|Red Channel]]
| | <br/> |
| |[[File:Splitgreen.jpg|frame|Green Channel]]
| | [[File:Splitgreen.jpg|frame|Green Channel]] |
| |[[File:Splitblue.jpg|frame|Blue Channel]]
| | <br/> |
| |}
| | [[File:Splitblue.jpg|frame|Blue Channel]] |
| | | <br/> |
|
| |
|
| ===Example=== | | ===Example=== |
Revision as of 12:45, 18 October 2022
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);
|