fft_fft_2d_correlation
Description
Perform 2d correlation on 2 matrices.
Syntax
int fft_fft_2d_correlation( int iRows, int iCols, double * mSig1, double * mSig2 )
Parameters
- iRows
- [input] the number of rows in the source matrices
- iCols
- [input] the number of columns in the source matrices
- mSig1
- [modify] the real matrices of size (iRows * iCols) for input, and contains the correlation matrix in the output
- mSig2
- [modify] the real matrices of size (iRows * iCols) for input, and contains the fourier transform of the correlation matrix for output
Return
Retrun 0 for success or error codes.
Examples
EX1
#include <..\OriginLab\fft.h>
void fft_fft_2d_correlation_ex1()
{
matrix sig1 = {{0, 0, 0},
{0, 1, 0},
{0, 0, 0}};
matrix sig2 = {{1, 0, 1},
{0, 0, 0},
{1, 0, 1}};
fft_fft_2d_correlation(3, 3, sig1, sig2);
for (int ii=0; ii<3; ii++)
{
for (int jj=0; jj<3; jj++)
printf ("%lf\t", sig1[ii][jj]);
printf ("\n");
}
for (ii=0; ii<3; ii++)
{
for (int jj=0; jj<3; jj++)
printf ("%lf\t", sig2[ii][jj]);
printf ("\n");
}
}
Remark
See Also
header to Include
fft.h
Reference
|