📅  最后修改于: 2022-03-11 14:46:23.591000             🧑  作者: Mango
import cv2
import numpy as np;
params = cv2.SimpleBlobDetector_Params()
ver = (cv2.__version__).split('.')
if int(ver[0]) < 3 :
detector = cv2.SimpleBlobDetector(params)
else :
detector = cv2.SimpleBlobDetector_create(params)
detector.empty() # <- now works
keypoints = detector.detect(image) # <- now works