Difference between revisions of "Function:Flip"

From CUVI Wiki
Line 33: Line 33:
| Supports:  
| Supports:  
{|
{|
|CUVI_FLIP_LEFT_RIGHT
|-CUVI_FLIP_LEFT_RIGHT
|CUVI_FLIP_LEFT_RIGHT
|-CUVI_FLIP_UP_DOWN
|-
|-CUVI_FLIP_BOTH_DIRECTIONS
|CUVI_FLIP_LEFT_RIGHT
|CUVI_FLIP_LEFT_RIGHT
|}
|}
|-
|-

Revision as of 16:10, 1 May 2012

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