2. Localization and Recognition
• Objects localization and recognition are tasks
of computer vision
• Localization means that the object’s spatial
coordinates should be identified
• Recognition means that the object’s
membership can be identified
• There are also situations when these two tasks
cannot be separated from each other
2
3. Cross-Correlation
• Cross-correlation is one of the classical tools
for solving localization and recognition
problems
• Cross-correlation (a sliding dot product) is a
measure of similarity of two signals
3
( )
( )
( ) ( ) ( )
( ) ( ) ( )
m
f g t f g t
f g k f m g k m
τ τ
∞
−∞
∞
=−∞
= ⊕
= +
∫
∑
4. Cross-Correlation Computation
• Analogous to the Convolution Theorem, the
Fourier transform of the cross-correlation
function is equal to the product of the Fourier
transform of one of the signals and the
complex conjugated Fourier Transform of
another signal
4
( ) ( ) ( )F f g F f F g= ⋅
5. Cross-Correlation Computation
• Following this important property, the cross-
correlation function can be easily calculated
using the inverse Fourier transform applied to
the product of the Fourier transform of one of
the signals and the complex conjugated
Fourier Transform of another signal
5
( )( ) ( )1 1
( ) ( )f g F F f g F F f F g− −
= = ⋅
6. Localization and Recognition using
Cross-Correlation
• If some signal f is contained in some signal g,
then the cross-correlation function
takes its maximal value at that coordinate
starting from f is contained in g
• If some image f(x,y) is contained in some
image g(x,y), starting from the coordinates
, then, their cross-correlation function
has a strong global maximum at
6
f g
( )0 0,x y
( )0 0,x y
7. Implementation
• This property is used for localization and
recognition of the object f in the image g
• To find f in g (or to show that it is not there), it
is necessary to zero-pad f up to sizes of g and
to find their cross-correlation function.
• If it has a strong global maximum, this means
that f is located in g starting from the
coordinates of this maximum
7
( )0 0,x y
8. Example
8
Target
Image of interest Cross-Correlation
function. Two white
points are its two global
maxima whose
coordinates coincide
with the target
coordinates