'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageExtrema2 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageExtrema2, mlib_ImageExtrema2_Fp \- image extrema .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_ImageExtrema2\fR(\fBmlib_s32 *\fR\fImin\fR, \fBmlib_s32 *\fR\fImax\fR, \fBconst mlib_image *\fR\fIimg\fR, \fBmlib_s32\fR \fIxStart\fR, \fBmlib_s32\fR \fIyStart\fR, \fBmlib_s32\fR \fIxPeriod\fR, \fBmlib_s32\fR \fIyPeriod\fR); .fi .LP .nf \fBmlib_status\fR \fBmlib_ImageExtrema2_Fp\fR(\fBmlib_d64 *\fR\fImin\fR, \fBmlib_d64 *\fR\fImax\fR, \fBconst mlib_image *\fR\fIimg\fR, \fBmlib_s32\fR \fIxStart\fR, \fBmlib_s32\fR \fIyStart\fR, \fBmlib_s32\fR \fIxPeriod\fR, \fBmlib_s32\fR \fIyPeriod\fR); .fi .SH DESCRIPTION .sp .LP Each of the functions determines the extrema values for each channel in an image, possibly with subsampling. .sp .LP It uses the following equation: .sp .in +2 .nf min[i] = MIN{ img[x][y][i] } max[i] = MAX{ img[x][y][i] } .fi .in -2 .sp .LP where .sp .in +2 .nf x = xStart + p*xPeriod; 0 \(<= p < (w - xStart)/xPeriod y = yStart + q*yPeriod; 0 \(<= q < (h - yStart)/yPeriod .fi .in -2 .SH PARAMETERS .sp .LP Each of the functions takes the following arguments: .sp .ne 2 .mk .na \fB\fImin\fR\fR .ad .RS 11n .rt Pointer to minimum vector, where length is the number of channels in the image. \fBmin[i]\fR contains the minimum of channel \fBi\fR. .RE .sp .ne 2 .mk .na \fB\fImax\fR\fR .ad .RS 11n .rt Pointer to maximum vector, where length is the number of channels in the image. \fBmax[i]\fR contains the maximum of channel \fBi\fR. .RE .sp .ne 2 .mk .na \fB\fIimg\fR\fR .ad .RS 11n .rt Pointer to a source image. .RE .sp .ne 2 .mk .na \fB\fIxStart\fR\fR .ad .RS 11n .rt Initial X sample coordinate. .RE .sp .ne 2 .mk .na \fB\fIyStart\fR\fR .ad .RS 11n .rt Initial Y sample coordinate. .RE .sp .ne 2 .mk .na \fB\fIxPeriod\fR\fR .ad .RS 11n .rt X sample rate. \fBxPeriod \(>= 1\fR. .RE .sp .ne 2 .mk .na \fB\fIyPeriod\fR\fR .ad .RS 11n .rt Y sample rate. \fByPeriod \(>= 1\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_ImageExtremaLocations\fR(3MLIB), \fBmlib_ImageMaximum\fR(3MLIB), \fBmlib_ImageMaximum_Fp\fR(3MLIB), \fBmlib_ImageMinimum\fR(3MLIB), \fBmlib_ImageMinimum_Fp\fR(3MLIB), \fBattributes\fR(5)