Detect semicircle in OpenCV

Use houghCircle directly on your image, don’t extract edges first. Then test for each detected circle, how much percentage is really present in the image: int main() { cv::Mat color = cv::imread(“../houghCircles.png”); cv::namedWindow(“input”); cv::imshow(“input”, color); cv::Mat canny; cv::Mat gray; /// Convert it to gray cv::cvtColor( color, gray, CV_BGR2GRAY ); // compute canny (don’t blur with … Read more