1

I have lots of curve But curves should completed to circle How can I do this process with hough circle I tried this method but I cant get a result Detect semi-circle in opencv My image is here:

enter image description here

j.doe
  • 327
  • 7
  • 22
  • do you want to treat each of those segments as a semi-circle?!? – Micka Sep 12 '16 at 05:35
  • yes exactly @Micka – j.doe Sep 12 '16 at 21:22
  • did you try the ransac version in the linked qurstion's answers? Maybe you have to tune the parameters a bit... – Micka Sep 13 '16 at 04:55
  • yes I did but I dont understant ,in the linked questions answer almost the same but hough doesnt work while ransac method is working Why hough doesnt work @Micka – j.doe Sep 13 '16 at 18:53
  • opencv hough isnt so well for edge images, because (that's my theory) it internally computes the gradient again instead of using the edge pixels directly. In addition, your edges don't look like real semi-circles, maybe hough has some hard coded maximum radius limitations and maybe your edges arent "circlish" enough. – Micka Sep 13 '16 at 19:00
  • hmm thank you I have to prepare a report about why hough circle is not work well (especially for on my image),what is a base theory in hough ircle for my project And I am looking for a resource about this Have you another idea for this situation @Micka – j.doe Sep 13 '16 at 19:08
  • in general, houghCircle function is quite sensitive to parameter changes. I would recommend you to try different hough circle implementations (maybe matlab?) too, maybe they are more robust. – Micka Sep 13 '16 at 19:09
  • Thank you can you give vote if you like my question @Micka – j.doe Sep 13 '16 at 19:11
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/123290/discussion-between-j-doe-and-micka). – j.doe Sep 13 '16 at 20:35

1 Answers1

1

Hough circles is the only way to do this.

The image is noisy but I suspect the problem is that there are very few points and you are trying a wide range of radii. This means that the Hough probability for each circle is very low.

Do you know what the radii should be? If you do try a reduced radius range.

If not I would run the image with a set of small radii ranges and see which produce any result

Martin Beckett
  • 94,801
  • 28
  • 188
  • 263
  • Thank you for good answer :) but I dont know radii Can you explain radii or can you show me on the İmage – j.doe Sep 11 '16 at 04:50
  • Radius is the half the width of the circle (radii is plural). With Hough circles you have to tell the function what range of radius to look for, if the rane it looks for is too big it won't find anything if the data is bad – Martin Beckett Sep 11 '16 at 13:12