Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Homework#2 - ECE181B Harris Corner Detector Implementation: Thuyen Ngo, Perm#5773155 January 25, 2012

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Homework#2 - ECE181B Harris Corner Detector Implementation

Thuyen Ngo, Perm#5773155 January 25, 2012

Algorithm

Basically, the implementation follows 5 steps discussed in class:

1.1

Compute Derivatives

In this case, we will also have to blur the original image along with (before) taking the derivative, which results in a quite simple way of approximating derivatives by noticing two following facts: i) Derivative of a convolution: For simplication, let consider the scalar case:

g(x) = f (x) h(x) =


f (t)h(x t)dt

g (x) =

f (t)h (x t)dt = f (x) h (x)

The above expression implies that we could compute the derivative of a convolution by convole the derivative of the kernel with the original function. This fact still holds true for higher dimentions - in our case, 2 dimentions. ii) Seperable convolution: From the text, we know that the two-dimentional kernel K corresponding to sucessive convolution with a horizontal kernel h and a vertical kernal v is the outer product of the 2 kernels . K = vhT Based on two above statements, in order to calculate Ix and Iy , instead of smoothing in both 2 directions then taking the derivatives of the resulting image, we now take derivative of the kernel and build new lter kernels to compute Ix and Iy . Gaussian kernal: h(x) = x h (x) = 2

1
2 21

x2
1

1
2 21

x2
1

Chosing the radius of the kernels N 31 , we calculate two one-dimentional kernels u for h(x) and v for h (x) (x [NN])

Ix is the resulting image after smoothing along y coordinate and taking derivatve (dirence) along x coordinate. Then the kernel for Ix : Fx = uv T Ix = Fx I (I is the original image) In the same way, Iy is the resulting image after smoothing along x coordinate and taking derivatve (dirence) along y coordinate and the kernel for Iy :
T Fy = vuT = Fx Iy = Fy I;

1.2

Compute 3 components of matrix A


2 Ix2 = Ix 2 Iy2 = Iy Ixy = Ix Iy

1.3

Blur the 3 images with a Gaussian kernel


1
x2
2 2

Gaussian Kernel: h(x) =

e 2 22 Now we smooth the image in both direction and the lter for that: F = uuT

1.4

Compute Corner Response Funtion (CRF)


CRF = det(A) (trace(A))2

Find det and trace of A and then:

1.5

Find local maxima and perform thersholding

- Using a maximal lter (with radius r) to nd local maxima max crf - Normalize local maxima = - Detect corners: > 0 (threshold) - Display detected corners. 2 max crf max(max crf )

Performance

Figure 1: 1 = 1, 2 = 3, = 0.04, r(maximal lter radius) = 1, 0(threshold) = 0.01

Figure 2: 1 = 1.5, 2 = 3, = 0.04, r = 1, 0 = 0.01 3

Figure 3: 1 = 1, 2 = 3, = 0.04, r = 1, 0 = 0.01

Figure 4: 1 = 1, 2 = 3, = 0.04, r = 1, 0 = 0.09 4

Figure 5: 1 = 1, 2 = 5, = 0.04, r = 1, 0 = 0.01

Figure 6: 1 = 1, 2 = 3, = 0.04, r = 10, 0 = 0.01 5

Figure 7: 1 = 1, 2 = 3, = 0.06, r = 1, 0 = 0.01 Notess: - When increase 1,2 , the lters blur the image more, and less corners detected (Fig1 vs Fig2; Fig3 vs Fig5) - Obviously, when increase 0 , less corners detected (Fig3 vs Fig4) - When increase the maximal lter radius r, we reduce the number of local maxima and therefore the ruduce the number of corners detected (Fig3 vs Fig6) - Finally increase , the detector becomes less senstive (Fig3 vs Fig7)

You might also like