Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multimedia Programming 06: Point Processing3

Similar presentations


Presentation on theme: "Multimedia Programming 06: Point Processing3"— Presentation transcript:

1 Multimedia Programming 06: Point Processing3
Departments of Digital Contents Sang Il Park

2 Outline Review Point Processing3 Unsharp Mask Image Histogram

3 Review Neighborhood Processing Mean Filtering Gaussian Filtering
Median Filtering

4 Review :Mean filtering
90 10 20 30 40 60 90 50 80

5 Review: Cross-correlation filtering
평균은 모든 점들마다 1/(2k+1)2의 값을 곱하는 것. 만약 점들마다 서로 다른 값을 곱한다면? 위와 같은 식을 상호상관 연산이라고 하며 다음과 같이 줄여 쓴다. H (각 점의 가중치)를 “filter,” “kernel,” 또는 “mask” 라고 부른다.

6 Review: Mean kernel 3x3 평균 필터의 커널은 무엇이 될까? u -1 1 v 1/9
1 v 90 1/9 ones, divide by 9

7 Review: Gaussian Filtering
점이 중심에서 멀어 질수록 가중치를 줄인다면 더 좋은 성질을 얻을 수 있다. 90 1 2 4 ones, divide by 9

8 Review: Median filtering
윈도우 내에서 중간값을 선택하는 것을 중간값 필터라고 한다. 90 90 Better at salt’n’pepper noise Not convolution: try a region with 1’s and a 2, and then 1’s and a 3 값을 크기순으로 올림차순으로 나열 Median(중간값)

9 Image Processing 3-1 Unsharp Mask Alexei Efros

10 Blurring Function in OpenCV
cvSmooth(IplImage * src, IplImage * dst, int type, int size) Type: CV_BLUR : Mean Filtering CV_GAUSSIAN : Gaussian Filtering CV_MEDIAN : Median Filter Size: 3, 5, 7, …, 2k+1

11 Unsharp Masking (언샵 필터링)
블러링(smoothing) 이 지워버리는 정보는 무엇일까? - = original blurred difference 블러된 이미지에 사라진 정보를 더하면 원본을 얻을 수 있다. = + blurred difference original

12 Unsharp Masking (언샵 필터링)
사라진 정보를 강조하여 표현한다면? = + a blurred difference original alpha 값을 조절하면 이미지의 날카로움을 조절할 수 있다  이를 Unsharp 필터라고 한다.

13 Unsharp Masking (언샵 필터링)
Example: Source image Alpha = 0

14 Unsharp Masking (언샵 필터링)
Example: Source image Alpha = 0.5

15 Unsharp Masking (언샵 필터링)
Example: Source image Alpha = 1

16 Unsharp Masking (언샵 필터링)
Example: Source image Alpha = 2

17 Unsharp Masking (언샵 필터링)
Example: Source image Alpha = 2 Alpha = 4

18 Color VS. Gray - = + = Gray image가 지워버리는 정보는 무엇일까?
original Gray difference Gray 이미지에 사라진 정보를 더하면 원본을 얻을 수 있다. = + Gray difference original

19 Unsharp Masking (언샵 필터링)
사라진 정보를 강조하여 표현한다면? = + a Gray difference New image alpha 값을 조절하면 이미지의 채도를 조절할 수 있다

20 Histogram Equalization
Image Processing 3-2 Histogram Equalization Alexei Efros

21 Image Histogram Histogram:
Counting the number of pixels with the same brightness image histogram

22 Image Histogram Histogram:
Counting the number of pixels with the same brightness

23 Image Histogram Example

24 Image Histogram Two images

25 Histogram Equalization
Modify the image to have a well-distributed histogram

26 Cumulative Histogram Number of the pixels below the brightness image

27 Cumulative histogram Cumulative Histograms Why is it so important?

28 Why is it so important? Let’s focus on the first image. output input
255 192 128 64 output input Let’s focus on the first image.

29 Why is it so important? Using Cumulative histogram as a function.
255 192 128 64 input output output input Using Cumulative histogram as a function.

30 Histogram Equalization

31 Coding Practice Make your own code for histogram equalization
For each color channel (R, G, B) 1. Compute the histogram 2. Compute the cumulative histogram 3. Set the maximum value as 255 4. Using the cumulative histogram as a mapping function 255 192 128 64

32 A colorful underwater world!


Download ppt "Multimedia Programming 06: Point Processing3"

Similar presentations


Ads by Google