Function:MinMax

From CUVI Wiki
Revision as of 14:54, 19 April 2013 by Jawad (talk | contribs)

Computes the minimum and maximum pixel values in the image

Function

CuviStatus minMax(const CuviImage& src,
                  Cuvi64f* minValue,
                  Cuvi64f* maxValue,
                  const CuviStream& stream = CuviStream());

Parameters

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

Image Type Support

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

Sample

Error creating thumbnail: Unable to save thumbnail to destination


Example

CuviImage gimg = cuvi::io::loadImage(path);

Cuvi64f* max = new Cuvi64f[gimg.channels()];
Cuvi64f* min = new Cuvi64f[gimg.channels()];


//Returns minimum and maximum pixel value	
cuvi::imageStatistics::minMax(gimg, min, max);