Davies: Computer Vision, 5th edition: Solutions to selected problems 3
3.3
This type of filter emulates the mode filter, and as such will enhance images by taking a
3.5
(a) See the main text in Chapter 3.
(b) Clear the whole histogram initially; then clear only the elements that have been filled,
after finding each median. Find the window minimum; then set sum equal to the
minimum before proceeding to find the median. Not having to clear the whole histogram
(c) See the main text in Chapter 3.
(d) original: 1 2 1 1 2 3 0 2 2 3 1 1 2 2 9 2 2 8 8 8 7 8 8 7 9 9 9
3 3 median: ? 1 1 1 2 2 2 2 2 2 1 1 2 2 2 2 2 8 8 8 8 8 8 8 9 9 ?
3.6
(a) On the background side of any edge, the background intensity dominates, so the
mode filter comes up with a central background intensity value. Similarly, it comes up
with a central foreground value on the foreground side of any edge. There is a critical
point on any edge where the dominant peak in the local intensity distribution changes over
(b) When a max filter is applied to an image, light background regions expand, and will
tend to reduce the size of objects, or even to eradicate small objects. It will also tend to
produce regions of constant (high) intensity in the image. In general, the mode filter will