Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 441: Computer Graphics Image Filtering Jinxiang Chai.

Similar presentations


Presentation on theme: "CSCE 441: Computer Graphics Image Filtering Jinxiang Chai."— Presentation transcript:

1 CSCE 441: Computer Graphics Image Filtering Jinxiang Chai

2 Outline Image Processing - Gaussian filtering - Median filtering - Bilateral filtering

3 Filtering In signal processing, a filter is a process that removes from a signal some unwanted component or feature

4 1D Signal Filtering

5 2D Image Filtering

6

7 Image Filtering Image filtering: change range of image g(x) = h(f(x)) f x h f x f x h f x Image warping: change domain of image g(x) = f(h(x))

8 Image Filtering Image filtering: change range of image g(x) = h(f(x)) Image warping: change domain of image g(x) = f(h(x)) h fg h f g

9 Filtering in Spatial Domain = Filter functionInput imageFiltered image

10 Gaussian Filtering in Spatial Domain Discrete approximation to Gaussian function with σ =1.0

11 Filtering in Spatial Domain Discrete approximation to Gaussian function with σ =1.0

12 Filtering in Spatial Domain Discrete approximation to Gaussian function with σ =1.0

13 Filtering in Spatial Domain Discrete approximation to Gaussian function with σ =1.0

14 Filtering in Spatial Domain Discrete approximation to Gaussian function with σ =1.0 Filtered_I 45 = X

15 Filtering inputGaussian filter

16 Median Filter For each neighbor in image, sliding the window Sort pixel values Set the center pixel to the median

17 Median Filter input Gaussian filterMedian filter

18 Median Filter Examples inputMedian 7X7

19 Median Filter Examples Median 11X11 Median 3X3

20 Median Filter Examples Median 11X11 Median 3X3 Straight edges kept Sharp features lost

21 Median Filter Properties Can remove outliers (peppers and salts) Window size controls size of structure Preserve some details but sharp corners and edges might get lost

22 Comparison of Mean, Gaussian, and Median originalMean with 6 pixels

23 Comparison of Mean, Gaussian, and Median originalGaussian with 6 pixels

24 Comparison of Mean, Gaussian, and Median originalMedian with 6 pixels

25 Common Problems Mean: blurs image, removes simple noise, no details are preserved

26 Common Problems Mean: blurs image, removes simple noise, no details are preserved Gaussian: blurs image, preserves details only for small σ.

27 Common Problems Mean: blurs image, removes simple noise, no details are preserved Gaussian: blurs image, preserves details only for small σ. Median: preserves some details, good at removing strong noise

28 Common Problems Mean: blurs image, removes simple noise, no details are preserved Gaussian: blurs image, preserves details only for small σ. Median: preserves some details, good at removing strong noise Can we find a filter that not only smooths regions but preserves edges?

29 Common Problems Mean: blurs image, removes simple noise, no details are preserved Gaussian: blurs image, preserves details only for small σ. Median: preserves some details, good at removing strong noise Can we find a filter that not only smooths regions but preserves edges? - yes, bilateral filter

30 Outline Image Processing - Gaussian filtering - Median filtering - Bilateral filtering

31 What Is Bilateral Filter? Bilateral - Affecting or undertaken by two sides equally Property: - Convolution filter - Smooth image but preserve edges - Operates in the domain and the range of image

32 Bilateral Filter Example Gaussian filter Bilateral filter

33 Bilateral Filter Example Gaussian filter Bilateral filter

34 1D Graphical Example Center Sample u It is clear that in weighting this neighborhood, we would like to preserve the step Neighborhood I(p) p

35 The Weights p I(p)

36 Filtered Values p I(p) Filtered value

37 Edges Are Smoothed p I(p) Filtered value

38 What Causes the Problem? p I(p) Filtered value

39 What Causes the Problem? p I(p) Filtered value Same weights for these two pixels!!

40 The Weights p I(p)

41 Bilateral filter Denoise Feature preserving Normalization Bilateral Filtering

42 Kernel Properties Per each sample, we can define a ‘Kernel’ that averages its neighborhood This kernel changes from sample to sample! The sum of the kernel entries is 1 due to the normalization, The center entry in the kernel is the largest, Subject to the above, the kernel can take any form (as opposed to filters which are monotonically decreasing).

43 Filter Parameters As proposed by Tomasi and Manduchi, the filter is controlled by 3 parameters: The filter can be applied for several iterations in order to further strengthen its edge-preserving smoothing N(u) – The neighbor size of the filter support,  c – The variance of the spatial distances,  s – The variance of the value distances,

44 Bilateral Filter input

45 Bilateral Filter input

46 Bilateral Filter input WcWc

47 Bilateral Filter input WcWc WsWs

48 Bilateral Filter input WcWc WsWs W s *W c

49 Bilateral Filter input WcWc WsWs W s *W c Output

50 Bilateral Filter Results Original

51 Bilateral Filter Results σ c = 3, σ s = 3

52 Bilateral Filter Results σ c = 6, σ s = 3

53 Bilateral Filter Results σ c = 12, σ s = 3

54 Bilateral Filter Results σ c = 12, σ s = 6

55 Bilateral Filter Results σ c = 15, σ s = 8

56 Additional Comments The bilateral filter is a powerful filter: - Can work with any reasonable distances function W s and W c, - Easily extended to higher dimension signals, e.g. Images, video, mesh, animation data etc. - Easily extended to vectored-signals, e.g. Color images, etc. [Fleishman et al, siggraph 03] Bilateral Mesh Denoising


Download ppt "CSCE 441: Computer Graphics Image Filtering Jinxiang Chai."

Similar presentations


Ads by Google