Difference between revisions of "Function:ChannelSplit"
From CUVI Wiki
Line 6: | Line 6: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus channelSplit(CuviImage | CuviStatus channelSplit(const CuviImage& src, | ||
CuviImage | CuviImage& red, | ||
CuviImage | CuviImage& green, | ||
CuviImage | CuviImage& blue, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 22: | Line 22: | ||
|- | |- | ||
| src | | src | ||
| CuviImage | | const CuviImage& | ||
| 3-channel input Image | | 3-channel input Image | ||
|- | |- | ||
| | | red | ||
| CuviImage | | CuviImage& | ||
| Output red channel image | | Output red channel image | ||
|- | |- | ||
| | | green | ||
| CuviImage | | CuviImage& | ||
| Output green channel image | | Output green channel image | ||
|- | |- | ||
| | | blue | ||
| CuviImage | | CuviImage& | ||
| Output blue channel image | | Output blue channel image | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
Line 73: | Line 73: | ||
//A single color image | //A single color image | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_COLOR); | ||
//Three single channel images for storing output | //Three single channel images for storing output | ||
CuviImage | CuviImage gr, gg, gb; | ||
//Split into R, G and B channels | //Split into R, G and B channels |
Revision as of 18:59, 18 April 2013
Splits a three channel image into R, G and B channels
Function
|
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 |
Sample
Error creating thumbnail: Unable to save thumbnail to destination |
Error creating thumbnail: Unable to save thumbnail to destination |
Error creating thumbnail: Unable to save thumbnail to destination |
Error creating thumbnail: Unable to save thumbnail to destination |
Example
|