Image Features - I
description
Transcript of Image Features - I
![Page 1: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/1.jpg)
1
Image Features - I
Hao Jiang
Computer Science Department
Sept. 22, 2009
![Page 2: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/2.jpg)
Outline
Summary of convolution and linear systems Image features
Edges Corners
Programming Corner Detection
2
![Page 3: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/3.jpg)
Properties of Convolution
3
1. Commutative: f * g = g * f
2. Associative (f * g) * h = f *(g * h)
3. Superposition (f + g) * h = f * h + g * h
full
(N+M-1)x(N+M-1)
N
M
![Page 4: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/4.jpg)
Linear System
4
hhf g = f * h
a f1+ b f2 => a g1 + b g2where the response of f1 is g1and the response of f2 is g2
Linear:
Shift invariant: if f => g, then f(n-m) => g(n-m)
![Page 5: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/5.jpg)
Composite Linear System
5
h1h1f
h1h1f
h2h2
h2h2
h1 + h2
h1*h2
![Page 6: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/6.jpg)
Nonlinear Filtering
Neighborhood filtering can be nonlinear
Median Filtering
6
1 1 11 2 11 1 1
Mask [1 1 1 ]
1 1 11 1 11 1 1
![Page 7: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/7.jpg)
Median Filtering in Denoising
7
Add 10% pepper noiseOriginal Image
![Page 8: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/8.jpg)
Median Filtering for Denoising
8
Median filter with 3x3 square structure element
![Page 9: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/9.jpg)
Median Filtering for Denoising
9
Median filter with 5x5 square structure element
![Page 10: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/10.jpg)
Compared with Gaussian Filtering
10
Kernel size 5x5 and sigma 3 Kernel size 11x11 and sigma 5
![Page 11: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/11.jpg)
11
Image Features
![Page 12: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/12.jpg)
Image Local Structures
12
Step Ridge
Peak
Valley
Corner Junction
![Page 13: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/13.jpg)
Image Local Structures
13
Step Ridge
Peak
Valley
Corner Junction
Line Structures:“Edge”
Point Structures:“Corners”
![Page 14: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/14.jpg)
Regions
14
![Page 15: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/15.jpg)
An Example
15
edgeRegion
corners
![Page 16: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/16.jpg)
Edge Detection in Matlab
16
>> im = imread('flower.jpg');>> im = im2double(im);>> im = rgb2gray(im);>> ed = edge(im, 'canny', 0.15);
![Page 17: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/17.jpg)
How to Find an Edge?
17
A 1D edge
![Page 18: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/18.jpg)
18
f(x)
f’(x)
f’’(x)
![Page 19: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/19.jpg)
Extend to 2D
19
ab
There is a direction in whichimage f(x,y) increases thefastest. The direction is calledthe gradient direction.
Gradient [df/dx df/dy]Magnitude: sqrt(fx^2 + fy^2)Direction: atan2(fy, fx)
![Page 20: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/20.jpg)
Finite Difference
Approximating derivatives using finite difference.
Finite difference and convolution
20
![Page 21: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/21.jpg)
Noise Reduction
21
0.01 noise
0.03 noise
![Page 22: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/22.jpg)
Noise Reduction
22
![Page 23: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/23.jpg)
Gaussian Filtering in Edge Detection
23
![Page 24: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/24.jpg)
Gaussian Filtering in Edge Detection
24
h * (g * f) = (h * g) * f
Difference Kernel Gaussian Kernel
image
Difference ofGaussian Kernel
![Page 25: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/25.jpg)
Edge Detection in Images
Gaussian smoothed filtering in x and y directions: Ix, Iy Non-maximum suppression for |Ix|+|Iy|
Edge Tracing – double thresholding.
25
![Page 26: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/26.jpg)
Edge Detection Using Matlab
Canny edge detector:
edge(image, ‘canny’, threshold) Sobel edge detector:
edge(image, ‘sobel’, threshold) Prewitt edge detector:
edge(image, ‘prewitt’, threshold)
26
![Page 27: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/27.jpg)
27D. Martin, C. Fowlkes, D. Tal, J. Malik. "A Database of Human Segmented Natural Images and its Application to Evaluating Segmentation Algorithms and Measuring Ecological Statistics”, ICCV, 2001
Berkeley Segmentation DataSet [BSDS]
![Page 28: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/28.jpg)
Corner Detection
Corner is a point feature that has large changing rate in all directions.
28
Step LinePeak
Flat region
![Page 29: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/29.jpg)
Find a Corner
29
Compute matrix H =
in each window. If the ratio(Ix2 * Iy2 – Ixy ^2 )------------------------ > T (Ix2 + Iy2 + eps)We have a corner
Ix2 IxyIxy Iy2=
![Page 30: Image Features - I](https://reader031.fdocuments.net/reader031/viewer/2022012922/5681520a550346895dc04cd0/html5/thumbnails/30.jpg)
Corner Detection Programming
30