寻找替代openCV的Blob检测器的建议

时间:2019-07-25 03:25:40

标签: python opencv convolution

我有一些用python编写的代码,用于清理图像,然后使用斑点检测器来识别清除后的图像中的斑点。虽然这对于较小的图片(例如549x549像素)有效。进行大尺寸图片(例如14790x13856像素)时,它变得非常慢。我想知道是否有人对如何使Blob检测器(oepncv)更快或替换库更快提出了建议?

编辑:

添加图片: 这是一张图片示例: Pic

大约是那个尺寸^,但是大了667倍

我已经编写了代码,并且小规模没有错误

params = cv2.SimpleBlobDetector_Params()

# change thresholds
params.minThreshold = 0
params.maxThreshold = 255

# Filter by Area.
params.filterByArea = True
params.minArea = 0
params.maxArea = 35

# Filter by Circularity
params.filterByCircularity = True
params.minCircularity = 0

# Filter by Convexity
params.filterByConvexity = True
params.minConvexity = 0

# Filter by Inertia
params.filterByInertia = True
params.minInertiaRatio = 0

# Create a detector with the parameters
detector = cv2.SimpleBlobDetector_create(params)
keypoints = detector.detect(third)
ImgPoints = cv2.drawKeypoints(third, keypoints, np.array([]), (0, 0, `255), cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)

结果是我保存的图片(tiff),没有错误消息。

0 个答案:

没有答案