OpenCV return keypoints coordinates and area from blob detection, Python

后端 未结 2 1813
情歌与酒
情歌与酒 2021-02-19 06:18

I followed a blob detection example (using cv2.SimpleBlobDetector) and successfully detected the blobs in my binary image. But then I don\'t know how to extract the

2条回答
  •  孤街浪徒
    2021-02-19 07:14

    The pt property:

    keypoints = detector.detect(frame) #list of blobs keypoints
    x = keypoints[i].pt[0] #i is the index of the blob you want to get the position
    y = keypoints[i].pt[1]
    

    Some documentation

提交回复
热议问题