12
Harris detector Convert image to greyscale Apply Gaussian convolution to blur the image and remove noise Calculate gradient of image in x and y direction for every pixel For each point in the image, consider a 3x3 square window of pixels around that point. Compute the Harris matrix H for that point, Compute the corner strength function Choose points whose c(H) is above threshold and c(H) is local maxima in a 10x10 neighborhood. These points will be called the feature points

Harris detector

Embed Size (px)

DESCRIPTION

Harris detector. Convert image to greyscale Apply Gaussian convolution to blur the image and remove noise Calculate gradient of image in x and y direction for every pixel For each point in the image, - PowerPoint PPT Presentation

Citation preview

Page 1: Harris detector

Harris detectorConvert image to greyscaleApply Gaussian convolution to blur the image and

remove noiseCalculate gradient of image in x and y direction for

every pixelFor each point in the image,

consider a 3x3 square window of pixels around that point. Compute the Harris matrix H for that point,

  Compute the corner strength function Choose points whose c(H) is above threshold and c(H) is local maxima in a 10x10 neighborhood.

These points will be called the feature points

Page 2: Harris detector

My simple descriptorFor each feature points

Take a 45x45 window centered at the feature pointNormalise the color of each pixels in the window

Make a 9x9 window  feature descriptor by applying linear weights to every 5 points and summing up the RGB values separately.

  The feature descriptor will contain the RGB value of the points, hence in total our feature descriptor has 9x9x3 dimensions

  

Page 3: Harris detector

Simple descriptor – Bike 1

Page 4: Harris detector

Simple descriptor – Bike 2

Page 5: Harris detector

Simple descriptor – bike 3

Page 6: Harris detector

Simple descriptor – bike 4

Page 7: Harris detector

Simple descriptor – bike 5

Page 8: Harris detector

Simple descriptor – bike 6

Page 9: Harris detector

My simple feature descriptor: bikes 1 – bikes 2 – matching with ratio

Page 10: Harris detector

My simple feature descriptor : bikes 1 –bikes 3 – matching with ratio

Page 11: Harris detector

Simple descriptor numbers(testMatch results)

My descriptor SIFT

Img1-img2 43.651483 7.281360

Img1-img3 64.347448 13.653063

Img1-img4 112.002063 19.995964

Img1-img5 320.155898 34.570192

The total error is the average Euclidean distance between a (correctly) transformed feature point in the first image and its matched feature point in the second image.

Page 12: Harris detector

• Your error number will be slightly different: (nInliers/nMatches)

My evaluation:for (unsigned int i=0; i<f1.size(); i++) { applyHomography(f1[i].x, f1[i].y, xNew, yNew, h); if (matches[i].id > 0) { d += sqrt(pow(xNew-f2[matches[i].id-1].x,2)+pow(yNew-f2[matches[i].id-1].y,2)); n++; }}

return d / n;

Your evaluation in skeleton code:for (unsigned int i=0; i<f1.size(); i++) { applyHomography(f1[i].x, f1[i].y, xNew, yNew, h); if (matches[i].id > 0) { d = sqrt(pow(xNew-f2[matches[i].id-1].x,2)+pow(yNew-f2[matches[i].id-1].y,2)); if (d < epsilon) nInliers++; nMatches++; }}return (nInliers / (float)nMatches);