Page 137 -
P. 137
116 3 Image processing
it is often useful to compute the area statistics for each individual region R. Such statistics
include:
• the area (number of pixels);
• the perimeter (number of boundary pixels);
• the centroid (average x and y values);
• the second moments,
x − x
M = x − xy − y , (3.46)
y − y
(x,y)∈R
from which the major and minor axis orientation and lengths can be computed using
eigenvalue analysis. 7
These statistics can then be used for further processing, e.g., for sorting the regions by the area
size (to consider the largest regions first) or for preliminary matching of regions in different
images.
3.4 Fourier transforms
In Section 3.2, we mentioned that Fourier analysis could be used to analyze the frequency
characteristics of various filters. In this section, we explain both how Fourier analysis lets us
determine these characteristics (or equivalently, the frequency content of an image) and how
using the Fast Fourier Transform (FFT) lets us perform large-kernel convolutions in time that
is independent of the kernel’s size. More comprehensive introductions to Fourier transforms
are provided by Bracewell (1986); Glassner (1995); Oppenheim and Schafer (1996); Oppen-
heim, Schafer, and Buck (1999).
How can we analyze what a given filter does to high, medium, and low frequencies? The
answer is to simply pass a sinusoid of known frequency through the filter and to observe by
how much it is attenuated. Let
s(x) = sin(2πfx + φ i ) = sin(ωx + φ i ) (3.47)
be the input sinusoid whose frequency is f, angular frequency is ω =2πf, and phase is φ i .
Note that in this section, we use the variables x and y to denote the spatial coordinates of an
image, rather than i and j as in the previous sections. This is both because the letters i and j
are used for the imaginary number (the usage depends on whether you are reading complex
variables or electrical engineering literature) and because it is clearer how to distinguish the
horizontal (x) and vertical (y) components in frequency space. In this section, we use the
letter j for the imaginary number, since that is the form more commonly found in the signal
processing literature (Bracewell 1986; Oppenheim and Schafer 1996; Oppenheim, Schafer,
and Buck 1999).
7 Moments can also be computed using Green’s theorem applied to the boundary pixels (Yang and Albregtsen
1996).