📜  python cv2 blob 检测 seg 错误 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:23.591000             🧑  作者: Mango

代码示例1
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