Image Processing Reference
In-Depth Information
line segments with parameters drawn from a normal distribution. The image was
restored using a stack filter applied within a 17-point window both with and with-
out envelope filtering. The result of applying the stack filter alone is shown in
Fig. 8.2(b).
Two different envelopes were used. In the first example, the upper bound
β
,
and lower bound
, of the envelope were set to an opening-closing and a clos-
ing-opening of the filtered image. The structuring element was a 3
α
3 cross dilated
by itself. This means that any extreme values of the image remaining after stack fil-
tering were trimmed off. The result is shown in Fig. 8.2(c).
In the second example, the envelope bounds were set to
×
β
=f + 30 and
α
=f -
30 where f is the median filter over a 5
×
5 window. The result is shown in
Fig. 8.2(d).
The authors expressed the error in terms of the mean-square error (MSE) crite-
ria. The original image had an MSE of 1912 and this was reduced to 106 by stack
filtering. The two envelope approaches further reduced the error to 79 and 55, re-
spectively. This is reflected in the appearance of the filtered images. The second en-
velope is the most beneficial because it uses the median filter to suppress the most
extreme errors. However, this does not affect the remainder of the image, which is
accurately restored by the stack filter.
The envelope constraint is very effective in that it basically uses one filter
within another. The stack filter is mostly very accurate with a few extreme errors.
The median filter always gives a result close to the correct value but causes some
local distortions. The envelope constraint combines the best properties of the two
filters by principally using the stack filter but limiting its output to be within a set
range of the median output. The median guards against extreme errors, but for the
vast majority of output samples, it does not influence the final value.
A further aspect of implementation involves designing electronic circuits to
carry out the processing. This is covered in the next section.
8.2 Hardware Implementation
The techniques presented in this topic thus far may be implemented in software us-
ing either a package such as MATLAB or programmed directly in C/C++. Whereas
the theory of morphology is documented in terms of set theory and lattices, these
operations must be translated into either logical or arithmetic operators when im-
plemented in software or hardware.
The binary imaging work may be implemented in hardware simply by forming
a function with inputs consisting of each location in the filter window. An example
of this was shown in Figs. 5.7 and 5.9 where the optimal filter for noise removal in a
document was designed and implemented.
Application to grayscale processing is more challenging. With the growth in
FPGA products the reader may wish to implement some of these methods in hard-
ware. The circuits presented are an illustration of the best approaches and are given
Search WWH ::




Custom Search