Difference between revisions of "Function:ChannelMerge"
From CUVI Wiki
(Created page with "__NOTOC__ Merges R, G and B Channel to form a color image ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus channelMerge(CuviImage* srcRed, ...") |
(→Sample) |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
Merges R, G and B Channel to form a color image | Merges R, G and B Channel to form a color image | ||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus channelMerge(CuviImage | CuviStatus channelMerge(const CuviImage& red, | ||
CuviImage | const CuviImage& green, | ||
CuviImage | const CuviImage& blue, | ||
CuviImage | CuviImage& dst, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
| Line 21: | Line 23: | ||
! Description | ! Description | ||
|- | |- | ||
| | | red | ||
| CuviImage | | const CuviImage& | ||
| Red channel input image | | Red channel input image | ||
|- | |- | ||
| | | green | ||
| CuviImage | | const CuviImage& | ||
| Green channel input image | | Green channel input image | ||
|- | |- | ||
| | | blue | ||
| CuviImage | | const CuviImage& | ||
| Blue channel input image | | Blue channel input image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | const CuviImage& | ||
| 3-channel output Image | | 3-channel output 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: | ||
| 16uC1 x 3 | | 16uC1 x 3 | ||
| 16uC3 | | 16uC3 | ||
|- | |||
| 32fC1 x 3 | |||
| 32fC3 | |||
|} | |||
|} | |} | ||
===Sample=== | ===Sample=== | ||
[[File:Splitred.jpg|none|frame|Red Channel]] | |||
<br/> | |||
[[File:Splitgreen.jpg|none|frame|Green Channel]] | |||
<br/> | |||
[[File:Splitblue.jpg|none|frame|Blue Channel]] | |||
<br/> | |||
[[File:Splitin.jpg|none|frame|Output Image]] | |||
<br/> | |||
===Example=== | ====Example==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
//Three single channel images | //Three single channel images | ||
CuviImage | CuviImage gr = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_GRAYSCALE); | ||
CuviImage | CuviImage gg = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_GRAYSCALE); | ||
CuviImage | CuviImage gb = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_GRAYSCALE); | ||
//A single color image for storing output | //A single color image for storing output | ||
CuviImage | CuviImage gout; | ||
//Merge R, G and B images into a single colored image | //Merge R, G and B images into a single colored image | ||
Latest revision as of 12:44, 18 October 2022
Merges R, G and B Channel to form a color image
Function
|
Parameters
|
Image Type Support
|
Sample
Example
|



