Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multimedia Programming 10: Unsharp Masking/ Histogram Equalization

Similar presentations


Presentation on theme: "Multimedia Programming 10: Unsharp Masking/ Histogram Equalization"— Presentation transcript:

1 Multimedia Programming 10: Unsharp Masking/ Histogram Equalization
Departments of Digital Contents Sang Il Park

2 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

3 Un-sharp Masking

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

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

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

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

8 More Unsharp Masking - = - = Unsharp masking을 순차적으로 적용하면..
가장 blurred 된 이미지로부터 원본을 다시 얻을 수 있을까? - = original blurred1 difference1 - = blurred1 blurred2 difference2

9 More Unsharp Masking + = + = Blurred2로부터 원본 복원: blurred2 difference2
original

10 More Unsharp Masking a + = b + = Blurred2로부터 원본 복원 시 각각의 정보 증감:
difference2 blurred1 a + = blurred1 difference1 original b

11 Histogram Equalization
Image Processing 3-1 Histogram Equalization Alexei Efros

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

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

14 Image Histogram Example

15 Image Histogram Two images

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

17 Cumulative Histogram Number of the pixels below the brightness image

18 Cumulative histogram Cumulative Histograms Why is it so important?

19 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.

20 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.

21 Histogram Equalization

22 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

23 A colorful underwater world!


Download ppt "Multimedia Programming 10: Unsharp Masking/ Histogram Equalization"

Similar presentations


Ads by Google