• Home
  • Textbooks
  • Digital Image Processing: An Algorithmic Introduction using Java
  • Filters

Digital Image Processing: An Algorithmic Introduction using Java

Wilhelm Burger, Mark J. Burge

Chapter 6

Filters - all with Video Answers

Educators


Chapter Questions

Problem 1

Explain why the "custom filter" in Adobe Photoshop (Fig. $6.6)$ is not strictly a linear filter.

Check back soon!

Problem 2

Determine the possible maximum and minimum results (pixel values) for a linear filter with
$$
H(i, j)=\left[\begin{array}{rrr}
-1 & -2 & 0 \\
-2 & 0 & 2 \\
0 & 2 & 1
\end{array}\right]
$$
when applied to an 8-bit grayscale image (with pixel values in the range $[0,255])$. Assume that no clamping of the results occurs.

Check back soon!

Problem 3

Modify the ImageJ plugin shown in Prog. 6.3 such that the image borders are processed as well. Use one of the methods for extending the image outside its boundaries as described in Sec. 6.5.2.

Check back soon!
03:54

Problem 4

Show that a standard box filter is not isotropic (i. e., does not smooth the image identically in all directions).

Amit Srivastava
Amit Srivastava
Numerade Educator
01:21

Problem 5

Explain why the clamping of results to a limited range of pixel values may violate the linearity property (Sec. 6.3.2) of linear filters.

Narayan Hari
Narayan Hari
Numerade Educator

Problem 6

Compare the number of processing steps required for nonseparable linear filters and $x / y$-separable filters sized $5 \times 5,11 \times 11$, $25 \times 25$, and $51 \times 51$ pixels. Compute the speed gain resulting from separability in each case.

Check back soon!

Problem 7

Implement a weighted median filter (Sec. 6.4.3) as an ImageJ plugin, specifying the weights as a constant, two-dimensional int array. Test the filter on suitable images and compare the results with those from a standard median filter. Explain why, for example, the weight matrix
$$
W(i, j)=\left[\begin{array}{lll}
0 & 1 & 0 \\
1 & 5 & 1 \\
0 & 1 & 0
\end{array}\right]
$$
does not make sense.

Check back soon!

Problem 8

Verify the properties of the impulse function with respect to linear filters Eqn. (6.30). Create a black image with a white pixel at its center and use this image as the two-dimensional impulse. See if linear filters really deliver the filter matrix $H$ as their impulse response.

Check back soon!
View

Problem 9

Describe the effect of a linear filter with the following filter matrix:
$$
H(i, j)=\left[\begin{array}{lll}
0 & 0 & 0 \\
0 & \mathbf{0} & 1 \\
0 & 0 & 0
\end{array}\right] .
$$

Victor Salazar
Victor Salazar
Numerade Educator

Problem 10

Design a linear filter (matrix) that creates a horizontal blur over a length of 7 pixels, thus simulating the effect of camera movement during exposure.

Check back soon!

Problem 11

Program your own ImageJ plugin that implements a Gaussian smoothing filter with variable filter width (radius $\sigma$ ). The plugin should dynamically create the required filter kernels with a size of at least $5 \sigma$ in both directions. Make use of the fact that the Gaussian function is $x / y$-separable (see Sec. 6.3.3).

Check back soon!
01:12

Problem 12

The "Laplacian of Gaussian" (LoG) filter (Fig. 6.8) is based on the sum of the second derivatives of the two-dimensional Gaussian. It is defined as
$$
\operatorname{LoG}_\sigma(x, y)=-\left(\frac{x^2+y^2-\sigma^2}{\sigma^4}\right) \cdot e^{-\frac{x^2+y^2}{2 \sigma^2}} .
$$
Implement the LoG filter as an ImageJ plugin of variable width $(\sigma)$, analogous to Exercise 6.11. Find out if the LoG function is $x / y$-separable.

Ernest Castorena
Ernest Castorena
Numerade Educator