MCPcopy Create free account
hub / github.com/PyImageSearch/imutils / corners_to_keypoints

Function corners_to_keypoints

imutils/feature/helpers.py:4–11  ·  view source on GitHub ↗

function to take the corners from cv2.GoodFeaturesToTrack and return cv2.KeyPoints

(corners)

Source from the content-addressed store, hash-verified

2import cv2
3
4def corners_to_keypoints(corners):
5 """function to take the corners from cv2.GoodFeaturesToTrack and return cv2.KeyPoints"""
6 if corners is None:
7 keypoints = []
8 else:
9 keypoints = [cv2.KeyPoint(kp[0][0], kp[0][1], 1) for kp in corners]
10
11 return keypoints

Callers 1

detectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…