• Home
  • Textbooks
  • Digital Image Processing
  • Image Enhancement in the Spatial Domain

Digital Image Processing

D. Sundararajan

Chapter 2

Image Enhancement in the Spatial Domain - all with Video Answers

Educators


Chapter Questions

00:22

Problem 1

Find the complement of the $4 \times 48$-bit gray level image and verify that the image can be restored by complementing the complemented image.
(i)
$$
\left[\begin{array}{rrrr}
112 & 148 & 72 & 153 \\
120 & 125 & 30 & 99 \\
95 & 120 & 89 & 33 \\
170 & 99 & 109 & 40
\end{array}\right]
$$
(ii)
$$
\left[\begin{array}{rrrr}
164 & 127 & 117 & 59 \\
154 & 122 & 104 & 83 \\
129 & 136 & 100 & 60 \\
117 & 128 & 80 & 48
\end{array}\right]
$$
(iii)
$$
\left[\begin{array}{llll}
46 & 48 & 46 & 45 \\
42 & 49 & 46 & 45 \\
64 & 73 & 60 & 43 \\
94 & 69 & 63 & 37
\end{array}\right]
$$

Katelyn Chen
Katelyn Chen
Numerade Educator
03:35

Problem 2

Find the complement of the $4 \times 4$ binary image and verify that the image can be restored by complementing the complemented image.
(i)
$$
\left[\begin{array}{llll}
1 & 0 & 0 & 0 \\
1 & 0 & 0 & 0 \\
1 & 1 & 0 & 0 \\
0 & 1 & 0 & 0
\end{array}\right]
$$
(ii)
$$
\left[\begin{array}{llll}
0 & 1 & 0 & 1 \\
0 & 0 & 0 & 1 \\
0 & 0 & 0 & 1 \\
0 & 0 & 0 & 1
\end{array}\right]
$$
(iii)
$$
\left[\begin{array}{llll}
1 & 1 & 0 & 0 \\
1 & 0 & 0 & 0 \\
1 & 1 & 1 & 1 \\
1 & 1 & 0 & 0
\end{array}\right]
$$

Bryan Lynn
Bryan Lynn
Numerade Educator

Problem 3

For the list of gray levels, apply gamma correction and find the corresponding new gray levels. Apply the inverse transformation to the new gray levels and verify that the given gray levels are obtained.
(i) $\gamma=0.8$.
(ii) $\gamma=1.1$.
(iii) $\gamma=1.8$.

Check back soon!
00:52

Problem 4

Given a $4 \times 4$ 4-bit image, find the histogram equalized version of it.
*(i)
$$
\left[\begin{array}{llll}
4 & 4 & 3 & 3 \\
4 & 4 & 4 & 3 \\
5 & 4 & 4 & 4 \\
4 & 4 & 4 & 4
\end{array}\right]
$$
(ii)
$$
\left[\begin{array}{llll}
1 & 1 & 0 & 1 \\
1 & 1 & 0 & 3 \\
1 & 0 & 0 & 2 \\
1 & 0 & 0 & 2
\end{array}\right]
$$
(iii)
$$
\left[\begin{array}{llll}
3 & 5 & 5 & 3 \\
4 & 4 & 4 & 3 \\
4 & 2 & 3 & 4 \\
4 & 2 & 2 & 3
\end{array}\right]
$$

Trinity Steen
Trinity Steen
Numerade Educator

Problem 5

Given $4 \times 4$ 4-bit reference and input images, use histogram matching to restore the input image.
*(i) The reference and input images, respectively, are
$$
\left[\begin{array}{llll}
4 & 4 & 3 & 3 \\
4 & 4 & 4 & 3 \\
5 & 4 & 4 & 4 \\
4 & 4 & 4 & 4
\end{array}\right]\left[\begin{array}{rrrr}
15 & 15 & 0 & 0 \\
15 & 15 & 15 & 0 \\
15 & 15 & 15 & 15 \\
15 & 15 & 15 & 15
\end{array}\right]
$$
(ii) The reference and input images, respectively, are
$$
\left[\begin{array}{llll}
3 & 3 & 3 & 3 \\
3 & 3 & 3 & 3 \\
3 & 2 & 2 & 3 \\
2 & 2 & 2 & 2
\end{array}\right]\left[\begin{array}{rrrr}
15 & 15 & 15 & 15 \\
15 & 15 & 15 & 15 \\
15 & 0 & 0 & 15 \\
0 & 0 & 0 & 0
\end{array}\right]
$$
(iii) The reference and input images, respectively, are
$$
\left[\begin{array}{llll}
3 & 5 & 5 & 3 \\
4 & 4 & 4 & 3 \\
4 & 2 & 3 & 4 \\
4 & 2 & 2 & 3
\end{array}\right]\left[\begin{array}{rrrr}
0 & 15 & 15 & 0 \\
15 & 15 & 15 & 0 \\
15 & 0 & 0 & 15 \\
15 & 0 & 0 & 0
\end{array}\right]
$$

Check back soon!
04:55

Problem 6

Given a $8 \times 8$ 8-bit image, find the binary, hard and soft thresholded versions with the threshold $T=160$.
$$
\left[\begin{array}{rrrrrrrr}
255 & 255 & 255 & 117 & 50 & 39 & 50 & 56 \\
255 & 255 & 255 & 194 & 45 & 26 & 48 & 54 \\
255 & 255 & 255 & 241 & 61 & 25 & 53 & 57 \\
255 & 255 & 255 & 255 & 104 & 32 & 64 & 64 \\
255 & 255 & 255 & 255 & 154 & 37 & 59 & 61 \\
255 & 255 & 255 & 255 & 199 & 54 & 55 & 61 \\
255 & 255 & 255 & 255 & 230 & 71 & 59 & 64 \\
255 & 255 & 255 & 255 & 250 & 95 & 60 & 68
\end{array}\right]
$$

Stanley Enemuo
Stanley Enemuo
Numerade Educator

Problem 7

Given a $4 \times 4$ image, find the $4 \times 4$ lowpass filtered output using the $3 \times 3$ averaging filter with the borders zero-padded.
$$
x(m, n)=\left[\begin{array}{llll}
70 & 62 & 51 & 45 \\
71 & 62 & 57 & 55 \\
73 & 65 & 56 & 60 \\
68 & 69 & 63 & 66
\end{array}\right]
$$

Check back soon!

Problem 8

Given a $4 \times 4$ image, find the $4 \times 4$ lowpass filtered output using the $3 \times 3$ averaging filter with the borders replicated.
$$
x(m, n)=\left[\begin{array}{llll}
41 & 43 & 45 & 43 \\
40 & 41 & 42 & 41 \\
42 & 38 & 39 & 42 \\
39 & 33 & 37 & 36
\end{array}\right]
$$

Check back soon!

Problem 9

Given a $4 \times 4$ image, find the $4 \times 4$ lowpass filtered output using the $3 \times 3$ averaging filter with the borders periodically extended.
$$
x(m, n)=\left[\begin{array}{llll}
45 & 78 & 87 & 51 \\
59 & 56 & 62 & 49 \\
59 & 39 & 44 & 57 \\
56 & 36 & 35 & 51
\end{array}\right]
$$

Check back soon!

Problem 10

Given a $4 \times 4$ image, find the $4 \times 4$ lowpass filtered output using the $3 \times 3$ Gaussian filter ( $\sigma=0.5$ ) with the borders symmetrically extended.
$$
x(m, n)=\left[\begin{array}{llll}
202 & 195 & 192 & 191 \\
216 & 211 & 200 & 209 \\
224 & 212 & 215 & 227 \\
224 & 205 & 227 & 230
\end{array}\right]
$$

Check back soon!

Problem 11

Given a $4 \times 4$ image, find the $4 \times 4$ lowpass filtered output using the $3 \times 3$ Gaussian filter ( $\sigma=0.5$ ) with the borders periodically extended.
$$
x(m, n)=\left[\begin{array}{llll}
202 & 195 & 192 & 191 \\
216 & 211 & 200 & 209 \\
224 & 212 & 215 & 227 \\
224 & 205 & 227 & 230
\end{array}\right]
$$

Check back soon!

Problem 12

Given a $4 \times 4$ image, find the $4 \times 4$ lowpass filtered output using the $3 \times 3$ Gaussian filter ( $\sigma=0.5$ ) with the borders zero-padded.
$$
x(m, n)=\left[\begin{array}{llll}
95 & 82 & 54 & 33 \\
84 & 78 & 56 & 64 \\
73 & 71 & 53 & 60 \\
73 & 73 & 54 & 36
\end{array}\right]
$$

Check back soon!

Problem 13

Given a $4 \times 4$ image, find the $4 \times 4$ highpass filtered output using the $3 \times 3$ Laplacian filter
$$
h(m, n)=\left[\begin{array}{rrr}
0 & 1 & 0 \\
1 & -4 & 1 \\
0 & 1 & 0
\end{array}\right]
$$
with the borders zero-padded.
$$
x(m, n)=\left[\begin{array}{llll}
45 & 52 & 56 & 52 \\
49 & 60 & 55 & 55 \\
47 & 55 & 53 & 46 \\
45 & 48 & 51 & 40
\end{array}\right]
$$

Check back soon!

Problem 14

Given a $4 \times 4$ image, find the $4 \times 4$ highpass filtered output using the $3 \times 3$ Laplacian filter with the borders symmetrically extended.
$$
x(m, n)=\left[\begin{array}{llll}
64 & 62 & 62 & 68 \\
68 & 66 & 58 & 64 \\
75 & 70 & 60 & 58 \\
72 & 69 & 59 & 60
\end{array}\right]
$$

Check back soon!

Problem 15

Given a $4 \times 4$ image, find the $4 \times 4$ highpass filtered output using the $3 \times 3$ Laplacian filter with the borders replicated.
$$
x(m, n)=\left[\begin{array}{llll}
39 & 40 & 35 & 33 \\
31 & 40 & 39 & 37 \\
34 & 38 & 41 & 43 \\
37 & 39 & 42 & 43
\end{array}\right]
$$

Check back soon!

Problem 16

Given a $4 \times 4$ image, find the $4 \times 4$ enhanced output using the $3 \times 3$ Laplacian sharpening filter
$$
h(m, n)=\left[\begin{array}{rrr}
0 & -1 & 0 \\
-1 & 5 & -1 \\
0 & -1 & 0
\end{array}\right]
$$
with the borders replicated.
$$
x(m, n)=\left[\begin{array}{llll}
190 & 206 & 228 & 238 \\
180 & 205 & 227 & 219 \\
182 & 203 & 211 & 159 \\
184 & 212 & 206 & 177
\end{array}\right]
$$

Check back soon!

Problem 17

Given a $4 \times 4$ image, find the $4 \times 4$ enhanced output using the $3 \times 3$ Laplacian sharpening filter with the borders periodically extended.
$$
x(m, n)=\left[\begin{array}{llll}
138 & 163 & 162 & 177 \\
148 & 157 & 167 & 175 \\
153 & 165 & 160 & 178 \\
157 & 162 & 164 & 188
\end{array}\right]
$$

Check back soon!

Problem 18

Given a $4 \times 4$ image, find the $4 \times 4$ enhanced output using the $3 \times 3$ Laplacian sharpening filter with the borders zero-padded.
$$
x(m, n)=\left[\begin{array}{llll}
201 & 195 & 191 & 169 \\
210 & 201 & 181 & 157 \\
213 & 207 & 190 & 166 \\
204 & 204 & 197 & 159
\end{array}\right]
$$
$$

Check back soon!

Problem 19

Given a $4 \times 4$ image, find the $4 \times 4$ median filtered output using the $3 \times 3$ window with the borders zero-padded.
(i)
$$
x(m, n)=\left[\begin{array}{llll}
201 & 195 & 191 & 169 \\
210 & 201 & 181 & 157 \\
213 & 207 & 190 & 166 \\
204 & 204 & 197 & 159
\end{array}\right]
$$
(ii)
$$
x(m, n)=\left[\begin{array}{llll}
138 & 163 & 162 & 177 \\
148 & 157 & 167 & 175 \\
153 & 165 & 160 & 178 \\
157 & 162 & 164 & 188
\end{array}\right]

Check back soon!