Function:YUV2RGB

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

Convert YUV color model to an RGB image

Function

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


Parameters

Name Type Description
srcImage CuviImage* Input YUV image
dstImage CuviImage* Output RGB 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
YUV Image
Error creating thumbnail: Unable to save thumbnail to destination
RGB Image


Example

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

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


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