Difference between revisions of "Function:Max"

From CUVI Wiki
Line 35: Line 35:
|}
|}


===Image Type Support===
====Image Type Support====
 
{|
|style="font-size:75%;"|
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 59: Line 60:
| 32fC3
| 32fC3
| CuviScalar
| CuviScalar
|}
|}
|}



Revision as of 18:30, 19 October 2022

Computes the maximum of image pixel values. Each channel is processed individually.

Function

CuviStatus max(const CuviImage& src,
               CuviScalar& maxValue,
               const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src const CuviImage& Input Image
maxValue CuviScalar& Maximum pixel value(s) 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

Error creating thumbnail: Unable to save thumbnail to destination


Example

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

CuviScalar maxValues;


//Returns maximum pixel value	
cuvi::imageStatistics::max(gimg, maxValues);