'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageStdDev 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageStdDev \- image standard deviation .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_ImageStdDev\fR(\fBmlib_d64 *\fR\fIsdev\fR, \fBconst mlib_image *\fR\fIimg\fR, \fBconst mlib_d64 *\fR\fImean\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_ImageStdDev()\fR function computes the standard deviation for each channel in the source image. .sp .LP It uses the following equation: .sp .in +2 .nf 1 w-1 h-1 sdev[i] = { ----- * SUM SUM (img[x][y][i] - mean[i])**2 }**0.5 w*h x=0 y=0 .fi .in -2 .sp .LP where, in the case of \fBmean == NULL\fR, .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\fIsdev\fR\fR .ad .RS 8n .rt Pointer to standard deviation array, whose size is the number of channels in the source image. \fBsdev[i]\fR contains the standard deviation of channel \fBi\fR. .RE .sp .ne 2 .mk .na \fB\fIimg\fR\fR .ad .RS 8n .rt Pointer to input image. .RE .sp .ne 2 .mk .na \fB\fImean\fR\fR .ad .RS 8n .rt Pointer to pre-computed mean array for each channel. (If \fBNULL\fR, it will be computed.) \fBmean[i]\fR contains the mean of channel \fBi\fR. .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_ImageMean_Fp\fR(3MLIB), \fBmlib_ImageStdDev_Fp\fR(3MLIB), \fBattributes\fR(5)