Function:Flip

From CUVI Wiki
Revision as of 16:03, 1 May 2012 by Jawad (talk | contribs)

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 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);