Difference between revisions of "Function:ChannelSplit"
From CUVI Wiki
(Created page with "__NOTOC__ Splits a three channel image into R, G and B channels ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus channelSplit(CuviImage* sr...") |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
===Function=== | ===Function=== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<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> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 22: | Line 24: | ||
|- | |- | ||
| 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 | ||
|} | |||
|} | |} | ||
===Image Type Support=== | ====Image Type Support==== | ||
{| | |||
|style="font-size:75%;"| | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 55: | Line 58: | ||
| 16uC3 | | 16uC3 | ||
| 16uC1 x 3 | | 16uC1 x 3 | ||
|- | |||
| 32fC3 | |||
| 32fC1 x 3 | |||
|} | |} | ||
|} | |} | ||
====Sample==== | |||
[[File:Splitin.jpg|none|frame|Input Image]] | |||
<br/> | |||
[[File:Splitred.jpg|none|frame|Red Channel]] | |||
<br/> | |||
[[File:Splitgreen.jpg|none|frame|Green Channel]] | |||
<br/> | |||
[[File:Splitblue.jpg|none|frame|Blue Channel]] | |||
<br/> | |||
===Example=== | ====Example==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
//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 | ||
CuviStatus st = cuvi:: | CuviStatus st = cuvi::colorOperations::channelSplit(gimg,gr,gg,gb); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 20:46, 18 October 2022
Splits a three channel image into R, G and B channels
Function
|
Parameters
|
Image Type Support
|
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
|