| Current File : //usr/share/man/man3mlib/mlib_ImageMean_Fp.3mlib |
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.TH mlib_ImageMean_Fp 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_ImageMean_Fp \- image mean
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>
\fBmlib_status\fR \fBmlib_ImageMean_Fp\fR(\fBmlib_d64 *\fR\fImean\fR, \fBconst mlib_image *\fR\fIimg\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBmlib_ImageMean_Fp()\fR function computes the mean value of all the pixels in the image.
.sp
.LP
It uses the following equation:
.sp
.in +2
.nf
1 w-1 h-1
mean[i] = ----- * SUM SUM img[x][y][i]
w*h x=0 y=0
.fi
.in -2
.SH PARAMETERS
.sp
.LP
The function takes the following arguments:
.sp
.ne 2
.mk
.na
\fB\fImean\fR\fR
.ad
.RS 8n
.rt
Pointer to mean array, where length is the number of channels in the image. mean[i] contains the mean of channel i.
.RE
.sp
.ne 2
.mk
.na
\fB\fIimg\fR\fR
.ad
.RS 8n
.rt
Pointer to an image.
.RE
.SH RETURN VALUES
.sp
.LP
The function returns \fBMLIB_SUCCESS\fR if successful. Otherwise it returns \fBMLIB_FAILURE\fR.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i)
lw(2.75i) |lw(2.75i)
.
ATTRIBUTE TYPEATTRIBUTE VALUE
_
Interface StabilityCommitted
_
MT-LevelMT-Safe
.TE
.SH SEE ALSO
.sp
.LP
\fBmlib_ImageMean\fR(3MLIB), \fBmlib_ImageStdDev\fR(3MLIB), \fBmlib_ImageStdDev_Fp\fR(3MLIB), \fBattributes\fR(5)