SMIL  1.1
FFT(W) based functions

Detailed Description

+ Collaboration diagram for FFT(W) based functions:

Functions

template<class T1 , class T2 >
RES_T correlation (Image< T1 > &imIn1, Image< T1 > &imIn2, Image< T2 > &imOut)
 2D image (normalized) cross correlation using FFT. More...
 

Function Documentation

◆ correlation()

RES_T smil::correlation ( Image< T1 > &  imIn1,
Image< T1 > &  imIn2,
Image< T2 > &  imOut 
)

2D image (normalized) cross correlation using FFT.

Input images must have same size.

Can be used to find a template image within a larger one:

correlation(sourceImg, templateImg, corrImg)
pt = IntPoint()
maxVal(corrImg, pt)
# gives the position of the template image within the source image
print pt.x, pt.y
RES_T correlation(Image< T1 > &imIn1, Image< T1 > &imIn2, Image< T2 > &imOut)
2D image (normalized) cross correlation using FFT.
Definition: DFFT.hpp:61
Point< int > IntPoint
IntPoint.
Definition: DCommon.h:212
T maxVal(const Image< T > &imIn, bool onlyNonZero=false)
maxVal() - Max value of an image
Definition: DMeasures.hpp:348