1 | initial version |
You get a list of Keypoint-instances from a feature-detector. To access the points, you can use the pt
-attribute, for example kp[0].pt would be the first point, where kp[0].pt[0] is the x coordinate and kp[0].pt[1] the y-coordinate of that point.
2 | No.2 Revision |
You get a list of Keypoint-instances from a feature-detector. To access the points, you can use the pt
-attribute, for example kp[0].pt would be the first point, where kp[0].pt[0] is the x coordinate and kp[0].pt[1] the y-coordinate of that point.
Example:
im = cv2.imread('example.jpg', cv2.CV_LOAD_IMAGE_GRAYSCALE)
fast = cv2.FastFeatureDetector()
kpts = fast.detect(im)
print kpts[0].pt
(336.0, 13.0)