Learn Before
Concept

Corner Detection

OpenCV uses the Shi-Tomasi Good Features to Track and Corner detection algorithm. We are going to want to convert the images into a gray scale object first. This is because the algorithms work significantly better on grey scale images.

img = cv2.imread(`path`) img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) corners = cv2.goodFeaturesToTrack(img, N, Q, ME)

The N parameter will return the N best guesses of corners. The Q parameter is a cut off on how specific the corner will be. The parameter ranges from 0 to 1 and the closer to 1 the more confident the corner will have to be to be included in the final output. The ME parameter is the minimum Euclidean distance between two corners, this is to prevent it from returning two corners when they are actually the same corner.

The output will be a list of floating point values.

0

1

Updated 2021-07-06

Tags

Python Programming Language

Data Science

Learn After