Difference between revisions of "Function:Max"
From CUVI Wiki
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Computes the maximum of image pixel values | Computes the maximum of image pixel values. Each channel is processed individually. | ||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus max(const CuviImage& src, | CuviStatus max(const CuviImage& src, | ||
CuviScalar& maxValue, | |||
const CuviStream& stream = CuviStream()); | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 24: | Line 26: | ||
|- | |- | ||
| maxValue | | maxValue | ||
| | | CuviScalar& | ||
| Maximum pixel value in the image | | Maximum pixel value(s) in the image | ||
|- | |- | ||
| stream | | stream | ||
| const CuviStream& | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
|} | |||
|} | |} | ||
===Image Type Support=== | ====Image Type Support==== | ||
{| | |||
|style="font-size:75%;"| | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 41: | Line 44: | ||
|- | |- | ||
| 8uC1 | | 8uC1 | ||
| | | CuviScalar | ||
|- | |- | ||
| 8uC3 | | 8uC3 | ||
| | | CuviScalar | ||
|- | |||
| 16uC1 | |||
| CuviScalar | |||
|- | |||
| 16uC3 | |||
| CuviScalar | |||
|- | |||
| 32fC1 | |||
| CuviScalar | |||
|- | |||
| 32fC3 | |||
| CuviScalar | |||
|} | |||
|} | |} | ||
===Sample=== | ====Sample==== | ||
{| | {| | ||
|- | |- | ||
Line 53: | Line 69: | ||
|} | |} | ||
====Example==== | |||
===Example=== | |||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 62: | Line 77: | ||
CuviImage gimg = cuvi::io::loadImage(path); | CuviImage gimg = cuvi::io::loadImage(path); | ||
CuviScalar maxValues; | |||
//Returns maximum pixel value | //Returns maximum pixel value | ||
cuvi::imageStatistics::max(gimg, | cuvi::imageStatistics::max(gimg, maxValues); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 18:30, 19 October 2022
Computes the maximum of image pixel values. Each channel is processed individually.
Function
|
Parameters
|
Image Type Support
|
Sample
Error creating thumbnail: Unable to save thumbnail to destination
|
Example
|