Function:ImageBinary

From CUVI Wiki
Revision as of 07:46, 26 April 2012 by Jawad (talk | contribs) (Created page with "__NOTOC__ ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus imageBinary(CuviImage* srcImage, CuviImage* dstImage, ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function

CuviStatus imageBinary(CuviImage* srcImage,
                       CuviImage* dstImage,
                       Cuvi32f threshold = 0.5f, 
                       CuviStream* stream = NULL);


Parameters

Name Type Description
srcImage CuviImage* Input Image
dstImage CuviImage* Output Image
threshold Cuvi32f Threshold level
stream CuviStream* GPU stream ID for execution


Image Type Support

Input Output
8uC1 8uC1
8uC3 8uC3

Sample

Input Image
Output Binary Image



Example

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

gimg->upload(img->imageData,img->widthStep);


//function call
cuvi::ColorOperations::imageBinary(gimg,gout);