Function:RGB2Gray

From CUVI Wiki
Revision as of 08:03, 18 April 2013 by Jawad (talk | contribs)

Converts an RGB image to gray scale using fixed transform coefficients

Function

CuviStatus rgb2gray(const CuviImage& src,
                    CuviImage& dst,
                    const CuviStream& stream = CuviStream());


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

Color Image
Output Gray Image


Example

CuviImage gimg = cuvi::io::loadImage(path), gout;

//function call
cuvi::colorOperations::rgb2gray(gimg,gout);