Function:Min

From CUVI Wiki
Revision as of 06:41, 8 May 2012 by Jawad (talk | contribs) (Created page with "__NOTOC__ Computes the minimum of image pixel values ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus min(CuviImage* image, C...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Computes the minimum of image pixel values

Function

CuviStatus min(CuviImage* image,
               Cuvi64f* minValue,
               CuviStream* stream = NULL);

Parameters

Name Type Description
image CuviImage* Input Image
minValue Cuvi64f* Minimum pixel value in the image
stream CuviStream* GPU stream ID for execution

Image Type Support

Input Output
8uC1 Cuvi64f single value
8uC3 Cuvi64f three values

Sample

Min.PNG


Example

CuviImage* gimg = new CuviImage(size, depth, nChannels);

Cuvi64f* min = -1;

//Upload input data
gimg->upload(hostImg->imageData, hostImg->widthStep);


//Sum of all pixel values	
cuvi::arithmeticLogical::min(gimg, &min);