| Current File : //usr/share/man/man3mlib/mlib_ImageAutoCorrel_Fp.3mlib |
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.TH mlib_ImageAutoCorrel_Fp 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_ImageAutoCorrel_Fp \- auto-correlation of an image
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>
\fBmlib_status\fR \fBmlib_ImageAutoCorrel_Fp\fR(\fBmlib_d64 *\fR\fIcorrel\fR,
\fBconst mlib_image *\fR\fIimg\fR, \fBmlib_s32\fR \fIdx\fR, \fBmlib_s32\fR \fIdy\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBmlib_ImageAutoCorrel_Fp()\fR function computes the auto-correlation of a floating-point image, given an offset.
.sp
.LP
It uses the following equation:
.sp
.in +2
.nf
1 w-dx-1 h-dy-1
correl[i] = -------------- * SUM SUM (img[x][y][i] * img[x+dx][y+dy][i])
(w-dx)*(h-dy) x=0 y=0
.fi
.in -2
.sp
.LP
where \fBw\fR and \fBh\fR are the width and height of the image, respectively.
.SH PARAMETERS
.sp
.LP
The function takes the following arguments:
.sp
.ne 2
.mk
.na
\fB\fIcorrel\fR\fR
.ad
.RS 10n
.rt
Pointer to auto-correlation array where size is equal to the number of channels. \fBcorrel[i]\fR contains the auto-correlation of channel \fBi\fR.
.RE
.sp
.ne 2
.mk
.na
\fB\fIimg\fR\fR
.ad
.RS 10n
.rt
Pointer to image.
.RE
.sp
.ne 2
.mk
.na
\fB\fIdx\fR\fR
.ad
.RS 10n
.rt
Displacement in the X direction.
.RE
.sp
.ne 2
.mk
.na
\fB\fIdy\fR\fR
.ad
.RS 10n
.rt
Displacement in the Y direction.
.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_ImageAutoCorrel\fR(3MLIB), \fBmlib_ImageCrossCorrel\fR(3MLIB), \fBmlib_ImageCrossCorrel_Fp\fR(3MLIB), \fBattributes\fR(5)