Difference between revisions of "Function:RGBA2Gray"
From CUVI Wiki
(Created page with "__NOTOC__ Converts an RGBA image to gray scale using fixed transform ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus RGBA2Gray(CuviImage* s...") |
|||
| Line 5: | Line 5: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus | CuviStatus rgba2gray(const CuviImage& src, | ||
CuviImage | CuviImage& dst, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
| Line 20: | Line 20: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src | ||
| CuviImage | | const CuviImage& | ||
| Input 4-channel image | | Input 4-channel image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | CuviImage& | ||
| Output single channel image | | Output single channel image | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
| Line 56: | Line 56: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_DEFAULT), gout; | ||
//function call | //function call | ||
cuvi::colorOperations:: | cuvi::colorOperations::rgba2gray(gimg,gout); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Latest revision as of 08:52, 19 April 2013
Converts an RGBA image to gray scale using fixed transform
Function
|
Parameters
| Name | Type | Description |
|---|---|---|
| src | const CuviImage& | Input 4-channel image |
| dst | CuviImage& | Output single channel image |
| stream | const CuviStream& | GPU stream ID for execution |
Image Type Support
| Input | Output |
|---|---|
| 8uC4 | 8uC1 |
| 16uC4 | 16uC1 |
Example
|