Learn Before
Activity (Process)

Shi-Tomasi Corner Detection with OpenCV

Use OpenCV's Shi-Tomasi Good Features to Track corner detector on a grayscale image:

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

N limits the result to the best N corner candidates. Q is a quality cutoff from 0 to 1; increasing it retains only stronger candidates. ME is the minimum Euclidean distance allowed between returned corners, reducing near-duplicate detections. The result contains floating-point corner coordinates that can be converted to pixel positions for drawing.

0

1

Updated 2026-08-11

Tags

Python Programming Language

Data Science

Learn After