我遇到了简单斑点检测器无法检测大于300的斑点的问题。
我有一个里面有一个乐高积木的图像,但无论我给它什么区域,它都不会检测到它。有什么想法吗?我想得到乐高积木的颜色,但我想过滤掉其他所有东西
params = cv2.SimpleBlobDetector_Params()
params.filterByArea = True
params.minArea = 500 # Tried using from 300 - 3000 and can't get a detection
params.filterByCircularity = False
params.filterByColor = False
params.filterByConvexity = False
params.filterByInertia = False
detector = cv2.SimpleBlobDetector_create(params)
keypoints = detector.detect(img)
发布于 2019-03-18 17:46:38
您的参数不足。搜索任何东西都不是一个好主意。您应该始终添加尽可能多的约束。
我建议您添加更多参数。我通过简单地添加maxArea
100000找到了你的积木。
500的minArea对我来说意义不大,因为到目前为止,最小的乐高积木也会超过这个数字。
https://stackoverflow.com/questions/55214023
复制相似问题