Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

  • Apply the Harris detector (with skimage.feature.corner_harris and skimage.feature.corner_peaks) on the image L.png.

  • Criticize the result: have all the corners been detected? Are there any false alarms (i.e. detections that do not correspond to corners)? How to explain these errors?

Correction

The objective of this exercise is to detect corners using the Harris detector.

The Harris detector can detect corners of an image, based on differences in intensity.

With the function corner_harris, choose method='k' and a value of kk between 0 and 0.2. This results in a new image, of the same size as the original image, whose intensities are proportional to the presence of a corner.

In the images below, the intensities are restricted to the interval [−0.4,0.4][-0.4, 0.4] in order to highlight the values of the image.

<Figure size 1224x360 with 4 Axes>

The function corner_peaks returns the coordinates of the strong values of the image, which correspond to the corners. These coordinates are returned in the form of a matrix, the first column corresponds to the ordinates, the second to the abscissas.

<Figure size 1224x360 with 2 Axes>

The images above correspond to the result obtained for two values of kk (and threshold_rel=0.01). When kk is large, only the sharpest corners are detected: one can see this in the image on the right.

However, not all corners of are detected: how to improve the result?

In addition, some points do not correspond to corners. They correspond actually to pixels with very different intensity from their neighbors, which is the definition of a corner for Harris.