Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
cv::Mat circles; std::vector<cv::Vec3f> circlesVEC; cv::cvtColor(quad,circles,CV_BGR2GRAY); cv::HoughCircles(circles,circlesVEC,CV_HOUGH_GRADIENT,1,10 ,100, 30, 1, 30);
这部分代码找到在垫圈中找到的所有圆圈我的问题我怎么知道每个找到的圆圈的半径有多大?谢谢
存储在矩阵中的圆圈每行一个圆圈,列是 x,y,r ,因此要获取圆圈信息,您可以使用以下代码:
cv::Point Center(cvRound(circles[i][0]), cvRound(circles[i][1])); int Radius = cvRound(circles[i][2]);