Download presentation
Presentation is loading. Please wait.
1
Histogram 直方圖 Statistics of the pixel gray-levels of an image h(r k )=n k : histogram gray level no. of occurrence
2
histogram p=imread( ‘ pout.tif ’ ); imshow(p), figure, imhist(p), axis tight
3
Histogram equalization ph=histeq(p);
4
Histogram equalization (cont.) [ph, t]=histeq(p); plot(t), title('transform function'); Exercise#1. Apply histogram equalization to tire image
5
Filtering in MATLAB x=uint8(10*magic(5)); a=ones(3,3)/9; filter2(a,x, ’ same ’ ); % output has same size, zero padding filter2(a,x, ’ valid ’ ); % apply to inside of image filter2(a,x, ’ full ’ ); % apply to each intersection between mask and image ans = 76.6667 85.5556 65.5556 67.7778 58.8889 87.7778 111.1111 108.8889 128.8889 105.5556 66.6667 110.0000 130.0000 150.0000 106.6667 67.7778 131.1111 151.1111 148.8889 85.5556 56.6667 105.5556 107.7778 87.7778 38.8889
6
Exercise#2: average filtering Use the test pattern to generate the following results. original 5x5 15x15 3x3 9x9 35x35
7
Definition of 1st derivative in mask filters Sobel operators
8
Exercise#3: 1st derivative Apply the Sobel filters to the lens image 水平邊 垂直邊 | 垂直邊 |+ | 水平邊 |
9
Definition of 2nd derivatives in filter mask: Laplacian 90 0 rotation invariant 45 0 rotation invariant (include Diagonals) 4- - - -- - -- - --- 8
10
Exercise#4: sharpening filter Generate the right images original Laplacian scaled sharpened
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.