Week5 - Filter Design
Week5 - Filter Design
Image Processing
INT3404 1/ INT3404E 21
Giảng viên: TS. Nguyễn Thị Ngọc Diệp
Email: [email protected]
Schedule
Tuần Nội dung Yêu cầu đối với sinh viên (ngoài việc đọc tài liệu tham khảo)
1
Giới thiệu môn học Cài đặt môi trường: Python 3, OpenCV 3, Numpy, Jupyter Notebook
1
28/02/2023
• Convolution
• Filter kernels
2
28/02/2023
For example, the unit impulse in Fig. 3.29(a) is given by d( x − 3) in the 1-D version of
5 Recall that A = 1 for a
unit impulse.
the preceding equation. Similarly, the impulse in Fig. 3.30(a) is given by d( x − 2, y − 2)
[remember, the origin is at (0, 0) ].
Summarizing the preceding discussion in equation form, the correlation of a
kernel w of size m × n with an image f ( x, y), denoted as (w ! f )( x, y), is given by
Eq. (3-31), which we repeat here for convenience:
a b
(w ! f )( x, y) = ∑ ∑ w(s, t ) f ( x + s, y + t )
s = −a t = −b
(3-34)
Because our kernels do not depend on ( x, y), we will sometimes make this fact explic-
it by writing the left side of the preceding equation as w ! f ( x, y). Equation (3-34) is
Padding evaluated for all values of the displacement variables x and y so that the center point
of w visits every pixel in f,† where we assume that f has been padded appropriately.
†
As we mentioned earlier, the minimum number of required padding elements for a 2-D correlation is (m − 1) 2
rows above and below f, and (n − 1) 2 columns on the left and right. With this padding, and assuming that f
is of size M × N , the values of x and y required to obtain a complete correlation are x = 0, 1, 2, … , M − 1 and
y = 0, 1, 2, … , N − 1. This assumes that the starting configuration is such that the center of the kernel coincides
with the origin of the image, which we have defined to be at the top, left (see Fig. 2.19).
3
28/02/2023
Filter kernels
• Smoothing/Noise reduction/Blurring
• Box filter
• Lowpass Gaussian filter
• Order-statistic (nonlinear) filter
• Max, min, median
• Other applications:
• Shading correction
• Unsharp masking
4
28/02/2023
Properties
10
5
28/02/2023
11
𝐺 𝑥, 𝑦 = 𝐺! 𝑥, 𝑦 𝐺" (𝑥, 𝑦)
• Associative property of convolution
12
6
28/02/2023
Computational advantage
13
14
7
28/02/2023
15
16
8
28/02/2023
Edge detection
17
Filter learning
• With DL
• Automatic learning <-- With a lot of engineering skills
• Without DL
• With a lot of a priori knowledge
18
9
28/02/2023
Topic:
Edge-preserving smoothing filters
19
Kuwahara-type filter
Ref:
Burger, Wilhelm, and Mark J. Burge. "Edge-Preserving Smoothing
Filters." Digital Image Processing. Springer, London, 2016. 413-451.
20
10
28/02/2023
Kuwahara-type filter
21
Kuwahara-type filter
22
11
28/02/2023
Nagao-Matsuyama filter
23
• Range filter: weights depend only upon the differences in pixel values
or range
Act as a point opration
24
12
28/02/2023
Bilateral filter
• Combining both domain filtering and range filtering
25
26
13
28/02/2023
[6] B. Ham, M. Cho, and J. Ponce, “Robust guided image filtering using nonconvex potentials,” IEEE Transactions on Pattern Analysis
and Machine Intelligence, 2017.
[7] L. Xu, C. Lu, Y. Xu, and J. Jia, “Image smoothing via l 0 gradient minimization,” in ACM Transactions on Graphics (TOG), vol. 30, no.
6. ACM, 2011, p. 174.
[8] D. Min, S. Choi, J. Lu, B. Ham, K. Sohn, and M. N. Do, “Fast global image smoothing based on weighted least squares,” IEEE
Transactions on Image Processing, vol. 23, no. 12, pp. 5638–5653, 2014.
[9] L. Bao, Y. Song, Q. Yang, H. Yuan, and G. Wang, “Tree filtering: Efficient structure-preserving smoothing with a minimum spanning
tree,” IEEE Transactions on Image Processing, vol. 23, no. 2, pp. 555–569, 2014.
[10] Q. Zhang, L. Xu, and J. Jia, “100+ times faster weighted median filter (wmf),” in Proceedings of the IEEE Conference on Computer
Vision and Pattern Recognition, 2014, pp. 2830–2837.
[11] S. Paris, S. W. Hasinoff, and J. Kautz, “Local laplacian filters: Edge- aware image processing with a laplacian pyramid.” ACM Trans.
Graph., vol. 30, no. 4, pp. 68–1, 2011.
[12] S. Bi, X. Han, and Y. Yu, “An l 1 image transform for edge-preserving smoothing and scene-level intrinsic decomposition,” ACM
Transactions on Graphics (TOG), vol. 34, no. 4, p. 78, 2015.
27
14