打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Opencv中SimpleBlobDetector的使用(斑点检测)
#include <opencv2/highgui.hpp> #include <opencv2/calib3d.hpp> #include <iostream> using namespace std; using namespace cv; int main(){ Mat img = imread("blob.jpg",IMREAD_GRAYSCALE); /* SimpleBlobDetector::Params params; //阈值控制 params.minThreshold = 10; params.maxThreshold = 200; //像素面积大小控制 params.filterByArea = true; params.minArea = 1000; //形状(凸) params.filterByCircularity = false; params.minCircularity = 0.7; //形状(凹) params.filterByConvexity = true; params.minConvexity = 0.9; //形状(园) params.filterByInertia = false; params.minInertiaRatio = 0.5; */ Ptr<SimpleBlobDetector> detector = SimpleBlobDetector::create(); vector<KeyPoint> keypoints; detector->detect(img,keypoints); Mat img_with_keypoints; drawKeypoints(img,keypoints,img_with_keypoints,Scalar(0,0,255),DrawMatchesFlags::DRAW_RICH_KEYPOINTS); imshow("keypoints",img_with_keypoints); waitKey(0); return 0; }
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
3.FAST角点检测
10分钟学会 OpenCV CUDA编程
使用opencv-python计算SIFT特征点的示例
OpenCV特征点检测算法对比
FAST特征点检测
ORB特征点检测
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服