Hi All, I’m successfully using HoughCircles to locate an indentation on an image of a piece of metal, but require also to validate whether the indentation is sufficiently circular (according to a defined criterion). My observation is that HoughCircles also detects indentations that are not sufficiently circular; therefore a 2nd validation step is needed.
What I have tried…
a) Using the output from FitEllipse to detect the ellipse that is in fact the same shape as the circle detected using HoughCircles. Because FitEllipse returns width and height, the idea was to use these to assess the circularity. This approach was a nearly successful but not quite, as there are 2 types of camera image to support and FitEllipse only detected the indentation on the images from one of them, in spite of extensive testing of different parameters.
b) I also tried the SimpleBlobDetector, but this only picked up very small blobs in the image, not the huge one right in the middle.
Any suggestions on where I might go from here?
In essence, it seems like a simple thing. we already have the centre point of the candidate circle and the radius, which may vary a bit depending on which point on the circumference the measurement is taken. So, is there a straightforward way to locate the circle edge and thereby measure the radius in each of the NSEW directions. If there is not, then I’m guessing I might need to…
- Either run the canny edge detector (invoked previously to test FitEllipse) and process the output somehow (?) to detect the circle edges.
- Or, perhaps copy and modify the HoughCircles function to achieve the same result?
- Or ???