The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Computes the sum of all pixel values in the image
Function
CuviStatus sum(const CuviImage& src,
Cuvi64f* sum,
const CuviStream& stream = CuviStream());
|
Parameters
Name
|
Type
|
Description
|
src
|
const CuviImage&
|
Input Image
|
sum
|
Cuvi64f*
|
Sum of all pixel values of 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
CuviImage gimg = cuvi::io::loadImage(path);
Cuvi64f* sum = new Cuvi64f[gimg.channels()];
//Sum of all pixel values
cuvi::imageStatistics::sum(gimg, sum);
|