Difference between revisions of "Function:RGB2Gray"
From CUVI Wiki
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Converts an RGB image to gray scale using fixed or custom transform coefficients | Converts an RGB image to gray scale using fixed or custom transform coefficients | ||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus rgb2gray(const CuviImage& src, | CuviStatus rgb2gray(const CuviImage& src, | ||
| Line 16: | Line 16: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
===Parameters=== | ===Parameters=== | ||
Revision as of 13:08, 18 October 2022
Converts an RGB image to gray scale using fixed or custom transform coefficients
Function
|
Parameters
| Name | Type | Description |
|---|---|---|
| src | CuviImage& | Input 3 channel image |
| dst | CuviImage& | Output single channel image |
| coeffs | CuviScalar& | Custom transformation coefficients |
| stream | CuviStream& | GPU stream ID for execution |
Image Type Support
| Input | Output |
|---|---|
| 8uC3 | 8uC1 |
| 16uC3 | 16uC1 |
| 32fC3 | 32fC1 |
Sample
Example
|

