Difference between revisions of "Function:MinMax"
From CUVI Wiki
Line 5: | Line 5: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus minMax(CuviImage | CuviStatus minMax(const CuviImage& src, | ||
Cuvi64f* minValue, | Cuvi64f* minValue, | ||
Cuvi64f* maxValue, | Cuvi64f* maxValue, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 19: | Line 19: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src | ||
| CuviImage | | const CuviImage& | ||
| Input Image | | Input Image | ||
|- | |- | ||
Line 32: | Line 32: | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
Line 64: | Line 64: | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path); | ||
Cuvi64f* max = new Cuvi64f[ | Cuvi64f* max = new Cuvi64f[gimg.channels()]; | ||
Cuvi64f* min = new Cuvi64f[ | Cuvi64f* min = new Cuvi64f[gimg.channels()]; | ||
gimg | |||
//Returns minimum and maximum pixel value | //Returns minimum and maximum pixel value | ||
cuvi:: | cuvi::imageStatistics::minMax(gimg, min, max); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Revision as of 14:54, 19 April 2013
Computes the minimum and maximum pixel values in the image
Function
|
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
|