【发布时间】:2020-07-20 09:57:49
【问题描述】:
我正在使用opencv blob检测功能来检测黑点,但它会导致速度慢和cpu消耗高。有没有更有效的方法来检测那些黑点?并且 Blob 检测有时无法检测到一些黑点
这是我的示例图片
这是我现有的代码
SimpleBlobDetector::Params params;
params.minThreshold = 50;
params.maxThreshold = 200;
params.filterByArea = true;
params.minArea = 500;
params.filterByCircularity = true;
params.minCircularity = 0.1;
std::vector<KeyPoint> keypoints;
Ptr<SimpleBlobDetector> detector = SimpleBlobDetector::create(params);
detector->detect( im, keypoints);
Mat im_with_keypoints;
drawKeypoints( im, keypoints, im_with_keypoints, Scalar(0,0,255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS );
这些是尝试检测的黑点
【问题讨论】:
-
您想要检测的所需点是什么?你的图像分辨率是多少?您可以使用形态学方法。 SimpleBlobDetector 是先进的,它通常会获得较慢的响应。调整输入源的大小会有所帮助
-
@YunusTemurlenk 我已经上传了另一张带有所需点的图片我想检测我的分辨率 1296 px x 966 px
标签: c++ opencv computer-vision blob diplib