Difference between revisions of "Function:Mean"
From CUVI Wiki
Line 5: | Line 5: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus mean(CuviImage | CuviStatus mean(const CuviImage& src, | ||
Cuvi64f* mean, | Cuvi64f* mean, | ||
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* mean = new Cuvi64f[ | Cuvi64f* mean = new Cuvi64f[gimg.channels()]; | ||
gimg | |||
//Returns mean of all pixel values in the image | //Returns mean of all pixel values in the image | ||
cuvi:: | cuvi::imageStatistics::mean(gimg, mean); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Revision as of 13:57, 19 April 2013
Computes the mean of image pixel values
Function
|
Parameters
Name | Type | Description |
---|---|---|
src | const CuviImage& | Input Image |
mean | Cuvi64f* | Mean of all pixel values 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
Error creating thumbnail: Unable to save thumbnail to destination
|
Example
|