Difference between revisions of "Function:RGB2YUV"

From CUVI Wiki
Line 50: Line 50:
|}
|}


===Sample===
====Sample====
{|
[[File:YUV_RGB_Out.jpg|none|frame|RGB Image]]
|-
<br/>
|[[File:YUV_RGB_Out.jpg|frame|RGB Image]]
[[File:YUV_RGB_In.jpg|none|frame|YUV Image]]
|[[File:YUV_RGB_In.jpg|frame|YUV Image]]
<br/>
|}
 
 


===Example===
===Example===

Revision as of 21:13, 18 October 2022

Convert RGB image to YUV color model

Function

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

Parameters

Name Type Description
src const CuviImage& Input RGB image
dst CuviImage& Output YUV image
stream const 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 = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_COLOR), gout;

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