Applications of convolution/correlation
Many many things defined by the programmer. and some standard operations
Object detection Blur image Remove noise Morphology (later) Edge detection (later)
27
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 60 10 2
3000 4350 5400 4200 4300 4800 5100 2460
28
For
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
Fastst nogle af frihedsgraderne
Kendt afstand mellem
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 = n i = m
Note: When the filter is symmetric: correlation
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 process. integration A critical point in the integration p
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 be used to carry out this Hampel can estimation. Each l
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 by using a weighted geometric mean scores The reason fo
We have seen how template matching can be easily carried out by matching a given template to an image. However this can be computationally intensive. In order to speed up the computation, a hierarchical resolution approach can be employed. approach Hierar
feature among the set of available images is chosen and the best matching location is stored. stored. The comparison is then continued at a higher The resolution level while limiting the search to the most promising candidates at the previous level, this
Application of Template Matching Application
Template matching has a number of Template applications: it is widely used in the field of Robotic Engineering, Manufacturing, Face Recognition, Medical Image Processing, Number plate identification in traffic
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 a human operator. operator. The electronic librarian re
Phase I: Users face acquisition Phase This is where the user presents his or her face to the This system for proper identification, the EL tries to match the users face to a centralised database. The the face centralised database is the search image while
to proceed with his or her transaction. to There are a number of issues to be considered There so that the integrity of the system is not compromised e.g. score integration and rejection. rejection. Score Integration Scores are metrics used in determining
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: Find this object in an image: 20 25 30 60 30 20 40 60
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 images afterwards
1 2 1 Input 1 2
2 1 0 2 5
0 4 1 1 3
1 2
Another example using Template Matching to find a given object. Matching
The filter is called a template or a mask
Input image Template Output
The brighter the value in the output, the better the The match match
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:
Complex and not well-defined
1 2 1 Input 1 2
2 1 0 2
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 the search image. pixel Where (xt, yt) represent the coor
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) and w(xt, yt) is f(x y) w(x is given by: given c(x, y) =