Function:Flip

From CUVI Wiki
Revision as of 16:02, 1 May 2012 by Jawad (talk | contribs) (Created page with "__NOTOC__ Mirrors an image about a horizontal or vertical axis, or both ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus flip(CuviImage* src...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mirrors an image about a horizontal or vertical axis, or both

Function

CuviStatus flip(CuviImage* srcImage,
                CuviImage* dstImage,
                CuviFlipType type = CUVI_FLIP_LEFT_RIGHT,
                CuviStream* stream = NULL);


Parameters

Name Type Description
srcImage CuviImage* Input image
dstImage CuviImage* Output image
type CuviFlipType Supports: { CUVI_FLIP_LEFT_RIGHT|CUVI_FLIP_LEFT_RIGHT|CUVI_FLIP_LEFT_RIGHT|}
stream CuviStream* GPU stream ID for execution


Image Type Support

Input Output
8uC1 8uC1
8uC3 8uC3
16uC1 16uC1
16uC3 16uC3

Sample

Error creating thumbnail: Unable to save thumbnail to destination
Input Image
Error creating thumbnail: Unable to save thumbnail to destination
Output Image


Example

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

//Populating GPU input image
gimg->upload(img->imageData,img->widthStep);


//function call
cuvi::geometryTransforms::flipImage(gimg,gout,CUVI_FLIP_LEFT_RIGHT);