Function:Mean

From CUVI Wiki
Revision as of 05:57, 19 April 2013 by Jawad (talk | contribs)

Computes the mean of image pixel values

Function

CuviStatus mean(const CuviImage& src,
                Cuvi64f* mean,
                const CuviStream& stream = CuviStream());

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

Mean2.PNG


Example

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

Cuvi64f* mean = new Cuvi64f[gimg.channels()];


//Returns mean of all pixel values in the image	
cuvi::imageStatistics::mean(gimg, mean);