Image Processing Reference
In-Depth Information
Fig. 5.8 An example of how a mean filter can be used to hide the identity of a person. The size of
the mean kernel decides the strength of the filter. Actual image size: 512 × 384
Looking back on the previous section we can now see that the left-most kernel in
Fig. 5.6 is exactly the mean filter. The mean filter smooths or blurs the image which
has different applications. In Fig. 5.8 one application is shown where the mean filter
is applied within the white box in order to hide the identity of a person. The bigger
the kernel, the more the smoothing. Another type of mean filter is when a kernel
like the middle one in Fig. 5.6 is applied. This provides higher weights to pixels
close to the center of the kernel. This mean filter is known as a Gaussian filter , since
the kernel coefficients are calculated from the Gaussian distribution (a bell-shaped
5.2.1 Template Matching
An important application of correlation is template matching . Template matching is
used to locate an object in an image. When applying template matching the kernel
is denoted a template . It operates by defining an image of the object we are looking
for. This object is now the template (kernel) and by correlating an image with this
template, the output image indicates where the object is. Each pixel in the output
image now holds a value, which states the similarity between the template and an
image patch (with the same size as the template) centered at this particular pixel
position. The brighter a value, the higher the similarity.
In Fig. 5.9 the correlation-based template matching is illustrated. 4 We can see a
bright spot in the center of the upper part of the output corresponding to where the
template matches best. Note also that as the template is shifted left and right with
respect to this position, a number of bright spots appear. The distances between
these spots correspond to the distance between the letters in the text.
Since correlation is based on multiplying the template and the input image, bright
areas in the input image tend to produce high values in the output. This is illustrated
in Fig. 5.10 where the large white section in the clothing of the child in the middle
produces the highest values in the output. This problem in general makes it difficult,
4 For binary images, template matching is normally performed using XOR.
Search WWH ::

Custom Search