Simple Object Detection
Finding a specific object in the image 1D example: An object is given (known) as an image, e.g., 30 60 30 Task: Find this object in an image:
Input Output
20 25 30 60 30 20 40
Template Matching
Two primary applications:
Finding an object type in an image
Which object type? Input image Templates:
Is object present in the image?
Input image
30
Template Matching
Problemer med TM
Finder kun translation (x,y) Hvis vi ogs vil finde rotation samt skalering, s skal vi have mange templates (4 frihedsgrader) => det tager lang tid
Mulige lsninger
Math. of 2D Convolution/Correlation
Convolution
g ( x, y ) = h * f ( x, y ) =
j = n i = m
n m
n
m
h(i , j ) f ( x i , y j )
Correlation
g ( x, y ) = h f ( x, y ) =
h(i , j ) f ( x + i , y + j )
j =
there is a separate score for the face matching and a separate score for the speech matching. Therefore we need to be able to integrate both of these scores into a unique score by some integration pro
estimate their average and variance so that their distributions can be translated and rescaled to zero average and unity variance. rescaled The hyperbolic tangent estimator proposed by The Hampel can
s|i, = 0.5[ tanh (0.001 (si, - tanh)/tanh)] where tanh and tanh are the average and standard deviation scores as given by the Hampel estimator. An effective way to combine the normalized An scores is
Electronic Librarian Electronic
The electronic librarian task is to correctly The identify a user by face and speech and to automate the process of book lending and return without the intervention of
structure, where large image values get multiplied by large mask values. multiplied
Finding a specific object in the image 1D example: An object is given (known) 1D as an image, e.g., 30 60 30 Task:
Problems at the borders
Why is the output image smaller than the input? We are lacking information The bigger the kernel the bigger the problem Does it matter? Yes, if we are going to combine the ima
Problems at the borders
Solutions
Add a value: 0, 255, neighbor (input/output)
Change histogram, very different value, new pattern, etc.
111 111 111 111 111
Truncate kernel: 3x3 => for example 2x3
Template Matching as Convolution Template
Let us call the search image f(x, y) Let f(x Let us call the template image w(xt, yt) Let w(x Where (x, y) represent the coordinates of each Where pixel in th
between the coefficients in f(x, y) and f(x y) w(xt, yt) over the whole area spanned by the w(x over template. The position with the highest score has the best match. The correlation between f(x, y) a
The summation is taken over the image region where w and f overlap. region The correlation function c(x,y) has the The c(x,y has disadvantage of being sensitive to changes in the amplitude of f and w,
What to remember
Neighborhood processing vs point processing Convolution versus correlation Kernel, mask, filter, template Mean filter: blur, preprocessing Template matching: object recognition Other
Introduction Introduction
Object recognition can be described as a task Object of finding a given object in an image. of Humans recognize a multitude of objects in Humans images with little effort, de
Exercises (2/2)
What are the potential problems associated with template matching? Can you apply Template Matching in your project?
If yes, how will you address the problems associated with template
A real life scenario real
Let us consider a simple task of retrieving a beer Let from the fridge. from Let us assume the beer is surrounded with lots of Let groceries and the fridge light is not worki
before we retrieve the beer from the fridge. from Even from this simple Even example, the challenges of visual object recognition are evident. This leads us to template matching as a means of recognis
Math of convolution
g ( x) = h * f ( x) = h(i ) f ( x i)
i = n n
g(x): output, h: filter, * means convolution, f(x): input, n = |_ width of filter / 2 _| |_ _|: rounds down, for example: |_ 1.7_| = 1
Template Matching Template
Template matching is conceptually a simple Template process for finding a small part of an image which matches a template image. which The basic idea here is to match a temp