! #"$
denote the source image, where %
î'&)(+*,&)-
. Specify the point set . î/&103246587:9<; 4 , and define = >@?BADC by E >GFIH1JLKNMGO'PRQTSU'V H)WXYKNWZN[]\ W_^a` b ScU V H)WXYKNW Z []\ W_da`fe
Once the transfer function is specified, the remainder of the algorithm is analogous to the lowpass filter algorithm. Thus, one specification would be
E >hgO i E >jXlk E >jX6FImnJ Q MpoqX'k E >jXaF Q J]rsMpotXuk = >jXYFmvJLrsMoswyxz { gO}|~ [ kE q E >1o e
82 CHAPTER 2. IMAGE ENHANCEMENT TECHNIQUES This pseudocode specification can also be used for the Butterworth and exponential highpass filter transfer functions which are described next.
The Butterworth highpass filter transfer function of order with scaling constant
is given by :G ILLL)]I ¡ c¢¤£¦¥ ¡§1]¨©3ª@«L« « £¬¥ ¡§1L¨G@«L« where I§1¨©q@®¯±°1²3³ 6´ °s²µ .
The transfer function for exponential highpass filtering is given by
s¶· ¸¹<º»¼¾½¡¿tÀÂÁÃÄsÅ §yÆÇ#¨NÆ¶È ] ÆLÉ:Ê¶Ë £¬¥ I§1L¨N3ªÌ]«f«¶ « £¬¥ I§1L¨NGÌ]«f«¶¶Í
2.16.
Exercises
1. Construct a synthetic image and add random perturbations to each pixel value. In your construction, choose a representation that clarifies the effects of local averaging when using the neighborhoods described below.
a. Implement the local averaging algorithm using the Moore neighborhood. b. Repeat 1.a using the skew neighborhood
N
=
2. Construct a synthetic image consisting of vertical stripes of different widths. a. Implement the local averaging algorithms using the Moore neighborhood. b. Repeat 2.a using the template
1
2
1
1
2
1
4
2
2
y
t =
and multiply the resulting image by 1/16.
c. Explain the different effects of these two smoothing operations.
3. Consider the following algorithm. At each pixel location, calculate the difference Î
between the pixel values of the two vertical neighbors above and below the pixel. Calculate the differenceÏ between the pixel values of the two horizontal neighbors to the left and
right of the pixel. If Î exceedsÏ , then the value of the pixel is replaced by the weighted
average of the pixel and its two horizontal neighbors. Otherwise, it is replaced by the average of the pixel and its two vertical neighbors.
a. Write an image algebra formulation of this algorithm. b. Implement the algorithm.
c. The algorithm can be implemented in terms of templates with weightsÐÒÑ andÓÔÑ .
Investigate the effects of this algorithm for different combinations of weights and also for repeated application.
2. 16 Exercises 83 4. Prove that the Max-Min Sharpening Transform stabilizes, i.e., show that there exists a positive integer Õ such that Ö×sØÚÙyÛDÜ'ÖÝÞØcÙyÛ for all integers ßnà@Õ .
5. Show that while ØcÙâáäãGÛjå æ}ç
ÜèÙéå æ}ç
áÌãêå æ¯ç
, it is not true in general that
ØÚÙ<áëãÛ3ì æ#ç ܱÙ,ì æYç áíã6ì æ#ç
. This shows that local averaging is a linear operation while median filtering is not.
6. A generalization of unsharp masking that is often used for object enhancement and background suppressions is given by the operation
ãØIîpïÚðÛÜêñ ñ ñ ñ ñòóô ÙsØIõïLßÛ1ö òóø÷ ÙsØIõ¡ïßÛñ ñ ñ ñ ñ
whereÙ denotes the input image, çÒù
is an ÕäúûÕ rectangular neighborhood centered at Øî]ï¡ðÛ,
çâü
is an ý±úvý rectangular neighborhood centered atØIîpï¡ðÛ , andÕ,þBý .
a. Provide an image algebra formulation of this algorithm.
b. Implement this algorithm on a synthetic image where the object intensity is greater than the background and the object size can be covered by
ç ù
. c. Repeat 6.b except that the object intensity is less than the background. d. Repeat 6.b except that the object size is greater than
ç ù
but less than
çü
. 7. Implement the Gaussian smoothing algorithm on at least two different images using different template support. Analyze your results.
8.* Implement the five histogram modifications described in Table 2.13.2 and describe their effects and differences when applied to an image.
9.* Develop a program to display histogram plots of digital images similar to those shown in Figure 2.12.1. Test your program on suitable images and provide an image algebra formulation of your program.
10.* It follows from Section 1.7 that if
ç
denotes anÕnúvÕ rectangular neighborhood and
ÿ
a template with
ç
ØÛGÜDØ ÿ
Û for each , then the image Ù á
æ
ÿ
is equivalent to Ù@å æ}ç
as long as one ignores boundary effects andÿ
Ø:Û Ü NÕ
ü
whenever DØ ÿ
Û.
a. Show that the Fourier transform of ÿ
is given by Ø1ïÛ Ü ù × × ù Ý × ù ù × ÷ ü"! #%$ Ý&('p×*) ü+!#-, Ý&('p× .
b. Using 10.a, establish a relationship between smoothing by averaging and lowpass filtering.
11.* Implement the three highpass filters described in Section 2.15. 12.* Consider the unsharp masking algorithm given byã/.Ü_Ù á
æ
ÿ
, whereÿ
denotes anÕÔú3Õ
rectangular template with ÿ
ØÛGÜ and ÿ Ø:ÛÜö ù ×0 ù whenever21Ü34DØ ÿ Û.
a. Find the Fourier transform of ÿ
.
b. Using 12.a, establish a relationship between unsharp masking and highpass filtering.
84 CHAPTER 2. IMAGE ENHANCEMENT TECHNIQUES
2.17.
References
[1] R. Gonzalez and P. Wintz, Digital Image Processing. Reading, MA: Addison-Wesley, second ed., 1987.
[2] W. Pratt, Digital Image Processing. New York: John Wiley, 1978.
[3] G. Ritter, J. Wilson, and J. Davidson, “Image algebra: An overview,” Computer Vision,
Graphics, and Image Processing, vol. 49, pp. 297–331, Mar. 1990.
[4] A. Lev, S. Zucker, and A. Rosenfeld, “Iterative enhancement of noisy images,” IEEE
Transactions on Systems, Man, and Cybernetics, vol. SMC-7, pp. 435–442, June 1977.
[5] D. Marr and E. Hildreth, “Theory of edge detection,” in Proceedings of the Royal
Society of London B, vol. 207, pp. 187–217, 1980.
[6] R. Leipnik, “The extended entropy uncertainty principle,” Information and Control, vol. 3, pp. 18–25, 1960.
[7] H. Kramer and J. Bruchner, “Iterations of a non-linear transformation for the enhancement of digital images,” Pattern Recognition, vol. 7, pp. 53–58, 1975. [8] R. Haralick and L. Shapiro, Computer and Robot Vision, vol. I. New York: Addison-
Wesley, 1992.
[9] P. Coffield, “An architecture for processing image algebra operations,” in Image
Algebra and Morphological Image Processing III, vol. 1769 of Proceedings of SPIE,
(San Diego, CA), pp. 178–189, July 1992.
[10] R. Gonzalez and R. Woods, Digital Image Processing. Reading, MA: Addison-Wesley, 1992.
[11] L. Loo, K. Doi, and C. Metz, “Investigation of basic imaging properties in digital radiography 4. Effect of unsharp masking on the detectability of simple patterns,”
Medical Physics, vol. 12, pp. 209–214, Mar. 1985.
[12] R. Cromartie and S. Pizer, “Edge-affected context for adaptive contrast enhancement,” in Ninth Conference on Information Processing in Medical Imaging, 1991.
[13] J. Harris, “Constant variance enhancement: a digital processing technique,” Applied
Optics, vol. 16, pp. 1268–1271, May 1977.
[14] P. Narendra and R. Fitch, “Real-time adaptive contrast enhancement,” IEEE Transac-
tions on Pattern Analysis and Machine Intelligence, vol. PAMI-3, pp. 655–661, Nov.
1981.
[15] D. Ballard and C. Brown, Computer Vision. Englewood Cliffs, NJ: Prentice-Hall, 1982. [16] A. Rosenfeld and A. Kak, Digital Picture Processing. New York, NY: Academic