Function:Max

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

Computes the maximum of image pixel values

Function

CuviStatus max(CuviImage* image,
               Cuvi64f* maxValue,
               CuviStream* stream = NULL);

Parameters

Name Type Description
image CuviImage* Input Image
maxValue Cuvi64f* Maximumpixel 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

Error creating thumbnail: Unable to save thumbnail to destination


Example

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

Cuvi64f* max = -1;

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


//Returns minimum pixel value	
cuvi::arithmeticLogical::max(gimg, &max);