
208 A Computational Introduction to Digital Image Processing, Second Edition
(a) (b)
FIGURE 8.13: The gull image (a) with periodic noise and (b) its transform
We will now remove these extra spikes, and invert the result. The first step is to find
their position. Since they will have the largest maximum value after the DC coefficient,
which is at position (201, 201), we simply have to find the maxima of all absolute values
except the DC coefficient. This will be easier to manage if we turn the absolute values of
the FFT into an array of type
uint8. Note that we make use of the find function which
returns all indices in an array corresponding to elements satisfying ...