1

Update:

The approach shown in this post: Detect semi-circle in opencv does not work in my case.

I appended the results. enter image description here enter image description here


Original:

I am using OpenCV to detect a semi-circle like shape. My idea is to find contours first and do some analysis later. Then I got stuck here. What are the rules to check whether the contour is a semi-circle shape?

Or maybe I should try matchShapes? Or feature detection which I think is a little overweight for such a task.

Any suggestion is greatly appreciated!

Thanks Deryk

enter image description here

Community
  • 1
  • 1
derek
  • 9,358
  • 11
  • 53
  • 94
  • possible duplicate of [Detect semi-circle in opencv](http://stackoverflow.com/questions/20698613/detect-semi-circle-in-opencv) – Bull Jul 13 '14 at 22:35
  • It is different. I am detecting a closed semi-circle like shape while that post is detecting a open semi-circle. – derek Jul 14 '14 at 17:21
  • A closed semi-circle is just an open semi-circle plus a line, you can detect both using Hough transforms. Did you try the answers to the duplicate question? – Bull Jul 14 '14 at 23:30
  • Sorry for the late reply. That approach does not work for my case. I appended the results in my post. – derek Jul 18 '14 at 06:17
  • I suppose those curves are not close enough to circular – Bull Jul 18 '14 at 08:49
  • matchShapes does not work well either. I am not familiar with feature detection, like SIFT, SURF. Is that an option? – derek Jul 19 '14 at 16:55
  • As you really only have edges, and SIFT suppresses features near edges, I don't think SIFT (or SURF) will be useful. You could try shape contexts or chordiograms http://www.cs.berkeley.edu/~malik/papers/mori-belongie-malik-pami05.pdf http://www.seas.upenn.edu/~taskar/pubs/segment_cvpr10.pdf – Bull Jul 20 '14 at 00:01

0 Answers0