Get startedGet started for free

Less corners

In this exercise, you will test what happens when you set the minimum distance between corner peaks to be a higher number. Remember you do this with the min_distance attribute parameter of the corner_peaks() function. The threshold_rel parameter will specify the minimum intensity of peaks.

Building from a bottom perspective
Image preloaded as building_image.

The functions show_image(), show_image_with_corners() and required packages have already been preloaded for you. As well as all the previous code for finding the corners. The Harris measure response image obtained with corner_harris() is preloaded as measure_image.

This exercise is part of the course

Image Processing in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Find the peaks with a min distance of 10 pixels
coords_w_min_10 = ____(measure_image, min_distance=____, threshold_rel=0.02)
print("With a min_distance set to 10, we detect a total", len(coords_w_min_10), "corners in the image.")
Edit and Run Code