Homework#2 - ECE181B Harris Corner Detector Implementation: Thuyen Ngo, Perm#5773155 January 25, 2012
Homework#2 - ECE181B Harris Corner Detector Implementation: Thuyen Ngo, Perm#5773155 January 25, 2012
Homework#2 - ECE181B Harris Corner Detector Implementation: Thuyen Ngo, Perm#5773155 January 25, 2012
Algorithm
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:
f (t)h(x t)dt
g (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
1.3
e 2 22 Now we smooth the image in both direction and the lter for that: F = uuT
1.4
1.5
- 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 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)