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);
コードのこの部分は、Mat 円で見つかったすべての円を見つけます。私の質問 見つかった円の半径の大きさをどのように知ることができますか? ありがとう
行ごとに1つの円が行列に格納され、列は x,y,r であるため、円情報を取得するには、以下のコードを使用できます。
cv::Point Center(cvRound(circles[i][0]), cvRound(circles[i][1])); int Radius = cvRound(circles[i][2]);