Difference between revisions of "Function:RGB2Gray"
From CUVI Wiki
| Line 5: | Line 5: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus | CuviStatus rgb2gray(const CuviImage& src, | ||
CuviImage | CuviImage& dst, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
| Line 20: | Line 20: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src | ||
| CuviImage | | CuviImage& | ||
| Input 3-channel image | | Input 3-channel image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | CuviImage& | ||
| Output single channel image | | Output single channel image | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
| Line 64: | Line 64: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path), gout; | ||
//function call | //function call | ||
cuvi::colorOperations:: | cuvi::colorOperations::rgb2gray(gimg,gout); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Revision as of 08:03, 18 April 2013
Converts an RGB image to gray scale using fixed transform coefficients
Function
|
Parameters
| Name | Type | Description |
|---|---|---|
| src | CuviImage& | Input 3-channel image |
| dst | CuviImage& | Output single channel image |
| stream | CuviStream& | GPU stream ID for execution |
Image Type Support
| Input | Output |
|---|---|
| 8uC3 | 8uC1 |
| 16uC3 | 16uC1 |
Sample
Example
|

