Function:RGB2YUV

From CUVI Wiki
Revision as of 17:38, 30 April 2012 by Jawad (talk | contribs) (Created page with "__NOTOC__ Convert RGB image to YUV color model ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus rgb2yuv(CuviImage* srcImage, ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Convert RGB image to YUV color model

Function

CuviStatus rgb2yuv(CuviImage* srcImage,
                   CuviImage* dstImage,
                   CuviStream* stream = NULL);


Parameters

Name Type Description
srcImage CuviImage* Input RGB image
dstImage CuviImage* Output YUV image
stream CuviStream* GPU stream ID for execution


Image Type Support

Input Output
8uC3 8uC3
16uC3 16uC3

Sample

Error creating thumbnail: Unable to save thumbnail to destination
RGB Image
Error creating thumbnail: Unable to save thumbnail to destination
YUV Image


Example

CuviImage* gimg = new CuviImage(size,img->depth,img->nChannels);
CuviImage* gout = new CuviImage(size,img->depth,img->nChannels);

//Upload RGB data to GPU
gimg->upload(img->imageData,img->widthStep);


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