Function:NOT

From CUVI Wiki
Revision as of 14:21, 30 April 2012 by Jawad (talk | contribs) (Created page with "__NOTOC__ Performs a bitwise NOT operation on each pixel ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus NOT(CuviImage* srcImage, ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Performs a bitwise NOT operation on each pixel

Function

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

Parameters

Name Type Description
srcImage CuviImage* Input Image
dstImage CuviImage* Destination Image
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
Negative Image


Example

//size of host image
CuviSize size = cuviSize(img1->width,img1->height);

//Creating GPU images
CuviImage* gimg = new CuviImage(size,img1->depth,img1->nChannels);
CuviImage* gout = new CuviImage(size,img2->depth,img2->nChannels);

//Populating data
gimg->upload(img1->imageData,img1->widthStep);
	
//Computing Negative of the image
cuvi::arithmeticLogical::NOT(gimg1,gout);