Image Processing Reference
In-Depth Information
5 × 5 templates, whereas a transform calculation is faster for larger ones. An alternative
analysis (Campbell, 1969) has suggested that (Gonzalez, 1987) 'if the number of non-zero
terms in (the template) is less than 132 then a direct implementation . . . is more efficient
than using the FFT approach'. This implies a considerably larger template than our analysis
suggests. This is in part due to higher considerations of complexity than our analysis has
included. There are, naturally, further considerations in the use of transform calculus, the
most important being the use of windowing (such as Hamming or Hanning) operators to
reduce variance in high-order spectral estimates. This implies that template convolution by
transform calculus should perhaps be used when large templates are involved, and then
only when speed is critical. If speed is indeed critical, then it might be better to implement
the operator in dedicated hardware, as described earlier.
3.4.3
On different template size
Templates can be larger than 3 × 3. Since they are usually centred on a point of interest, to
produce a new output value at that point, they are usually of odd dimension. For reasons
of speed, the most common sizes are 3 × 3, 5 × 5 and 7 × 7. Beyond this, say 9 × 9, many
template points are used to calculate a single value for a new point, and this imposes high
computational cost, especially for large images. (For example, a 9 × 9 operator covers nine
times more points than a 3 × 3 operator.) Square templates have the same properties along
both image axes. Some implementations use vector templates (a line), either because their
properties are desirable in a particular application, or for reasons of speed.
The effect of larger averaging operators is to smooth the image more, to remove more
detail whilst giving greater emphasis to the large structures. This is illustrated in Figure
3.15 . A 5 × 5 operator, Figure 3.15 (a), retains more detail than a 7 × 7 operator, Figure
3.15 (b), and much more than a 9 × 9 operator, Figure 3.15 (c). Conversely, the 9 × 9
operator retains only the largest structures such as the eye region (and virtually removing
the iris) whereas this is retained more by the operators of smaller size. Note that the larger
operators leave a larger border (since new values cannot be computed in that region) and
this can be seen in the increase in border size for the larger operators, in Figures 3.15 (b)
and (c).
(a) 5
5
(b) 7
7
(c) 9
9
Figure 3.15
Illustrating the effect of window size
Search WWH ::




Custom Search