Difference between revisions of "Function:Max"
From CUVI Wiki
| Line 5: | Line 5: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus max(CuviImage | CuviStatus max(const CuviImage& src, | ||
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 28: | Line 28: | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
| Line 60: | Line 60: | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path); | ||
Cuvi64f* max = new Cuvi64f[ | Cuvi64f* max = new Cuvi64f[gimg.channels()]; | ||
gimg | |||
//Returns maximum pixel value | //Returns maximum pixel value | ||
cuvi:: | cuvi::imageStatistics::max(gimg, max); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Revision as of 05:29, 19 April 2013
Computes the maximum of image pixel values
Function
|
Parameters
| Name | Type | Description |
|---|---|---|
| src | const CuviImage& | Input Image |
| maxValue | Cuvi64f* | Maximum pixel value in the image |
| stream | const CuviStream& | GPU stream ID for execution |
Image Type Support
| Input | Output |
|---|---|
| 8uC1 | Cuvi64f single value |
| 8uC3 | Cuvi64f three values |
Sample
Example
|