OpenCV return keypoints coordinates and area from blob detection, Python
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 coordinates and area of the keypoints. Here are the code for the blob detections: # I skipped the parameter setting part. blobParams = cv2.SimpleBlobDetector_Params() blobVer = (cv2.__version__).split('.') if int(blobVer[0]) < 3: detector = cv2.SimpleBlobDetector(blobParams) else: detector = cv2.SimpleBlobDetector_create(blobParams) # Detect Blobs keypoints_black = detector.detect(255-black_blob) trans_blobs = cv2.drawKeypoints