---
name: "im_mean_std_int_buffer"
section: "3"
platform: "linux"
package: "libvips-dev"
version: "7.20.7-1+b3"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/im_mean_std_int_buffer"
---

# im\_mean\_std\_int\_buffer(3)

calculates the mean and the std of data held by a by an int or double buffer

## NAME

im\_mean\_std\_double\_buffer, im\_mean\_std\_int\_buffer - calculates the mean and the std of data held by a by an int or double buffer

## SYNOPSIS

**#include \<vips/vips.h\>**

int im\_mean\_std\_int\_buffer(buf, size, mean, std)\
 **int \*buf;**\
 **int size;**\
 **double \*mean, \*std;**

int im\_mean\_std\_double\_buffer(buf, size, mean, std)\
 **double \*buf;**\
 **int size;**\
 **double \*mean, \*std;**

## DESCRIPTION

im\_mean\_std\_int\_buffer() and im\_mean\_std\_double\_buffer() calculate the mean and the standard deviation (std) of data held by the  integer or double buffer buf.  The buffer has size elements.  The results are returned to the locations pointed by mean and std. It is the responsibility of the calling function to ensure that there is enough data in the buffer.

## RETURN VALUE

Both functions returns 0 on success and -1 on error.

## SEE ALSO

[im\_avg(3)](/im_avg/3.md), [im\_stats(3)](/im_stats/3.md).

## COPYRIGHT

N. Dessipris

## AUTHOR

N. Dessipris - 10/05/1991
