Function:Min

From CUVI Wiki
Jump to: navigation, search

Computes the minimum of image pixel values

Function

CuviStatus min(const CuviImage& src,
               CuviScalar& minValue,
               const CuviStream& stream = CuviStream());

Parameters

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

Image Type Support

Input Output
8uC1 CuviScalar
8uC3 CuviScalar
16uC1 CuviScalar
16uC3 CuviScalar
32fC1 CuviScalar
32fC3 CuviScalar

Sample

Min.PNG


Example

CuviImage gimg = cuvi::io::loadImage(path);
 
CuviScalar min;
 
//Returns minimum pixel value(s)
cuvi::imageStatistics::min(gimg, min);