Commit d0b43c57 authored by 付尧(20研)'s avatar 付尧(20研)

main

parent b1684d15
...@@ -54,9 +54,14 @@ int main() ...@@ -54,9 +54,14 @@ int main()
cv::Ptr<cv::SimpleBlobDetector> detector = SimpleBlobDetector::create(params); cv::Ptr<cv::SimpleBlobDetector> detector = SimpleBlobDetector::create(params);
vector<KeyPoint> keyp; vector<KeyPoint> keyp;
detector->detect(roi, keyp); detector->detect(roi, keyp);
cout << keyp.size() << endl; if (keyp.size() == 7) //7个白色的圆
imshow("ROI", roi); {
waitKey(0); cout << keyp[1].pt.x+minx << endl;
imshow("ROI", roi);
waitKey(0);
}
} }
drawContours(imageContours, contours, i, Scalar(255), 1, 8, hierarchy); drawContours(imageContours, contours, i, Scalar(255), 1, 8, hierarchy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment