Image Processing Reference
In-Depth Information
put window, the greater the possibility there is that the output pixel should be black.
If the observation tables shown in earlier chapters were mapped onto the lattice of
the function, they reflect this trend, otherwise an increasing filter is of no use. In-
creasing filters are no good for recognition-type problems. Consider the earlier
OCR example that attempted to find the letter “e”. For an all-white input window
the output should be 0. Similarly, for an all-black window it should also be 0. It is
only for some particular cases of input fitting the letter “e” that the output should be
1. So an increasing filter would not work in this case and a nonincreasing would be
necessary. Dougherty 8 showed that any nonincreasing filter may be expressed as
the difference between two increasing filters. This is similar to the hit-or-miss
transform where one filter characterizes the foreground and one the background.
The two filters must however be designed together and not separately.
Returning to the earlier example of image restoration shown in Fig. 2.1, the op-
timum filter for this image was determined from the observation table shown in
Fig. 3.8. Using minimization techniques, it can be shown that the optimum function
reduces to the expression shown in Eqn. 5.10:
F=X 0 X 1 X 2 +X 0 X 2 X 3 +X 1 X 2 X 4 +X 2 X 3 X 4 .
(5.10)
F = X 2 ( X 0 X 1 +X 0 X 3 +X 1 X 4 +X 3 X 4 ).
As the function has no negation, it is an increasing function and therefore has a
morphological basis representation. The structuring elements to implement this
morphological representation are shown in Fig. 5.6. These structuring elements
give a great insight into the nature of filtering being applied. In all of the structuring
elements, the center pixel X 2 is black. Therefore, only pixels that are black prior to
filtering will be black after filtering. Effectively, it will switch some black pixels to
white but not the other way around. This makes sense because it was trained just on
additive noise and will only try to remove it. The structure is also very interesting.
For a black pixel to be retained, it must be supported by two other pixels. However,
these two cannot be opposite each other.
Having placed the filter in a morphological context, it is a simple matter to im-
plement an electronic circuit to carry out the filtering. The union of erosions trans-
lates directly into a sum-of-products implementation of the filter. One four-input
OR gate fed by four three-input AND gates completes the circuit. This is shown in
Fig. 5.7. Notice that there are no inverters anywhere in the circuit. This is largely a
schematic representation, but it can very easily be converted to discrete hardware,
FPGA, or ASIC implementation.
In restoration examples like this, the number of corrupted pixels is usually a
small proportion of the total document—typically 5-15%. If the error rate was
much greater than this (say 50-60%), statistical restoration would be of no value
since the noise would be in the majority. Therefore, only a minority of pixels are
Search WWH ::




Custom Search