4

I'm facing a problem which I thought was simple but now it's tearing up my scalp.

Given a line drawing, is it possible to find the number of arcs or curves in the drawing? If possible at all, what would be the best way to go about this?

Example:

line drawing with two curves

The above image has two curves but I have been trying all sorts of algorithms to locate them with no success. Any thoughts?

rtuner
  • 2,362
  • 3
  • 25
  • 37
  • 2
    Please choose a language. – Hovercraft Full Of Eels Oct 19 '13 at 19:55
  • Here's an example using OpenCV : http://stackoverflow.com/questions/11424002/how-to-detect-simple-geometric-shapes-using-opencv – aybe Oct 19 '13 at 22:18
  • Is the goal to find the two curves or to eliminate the closed shapes? – Brannon Oct 29 '13 at 03:52
  • what assumptions can be made about the input image? Will it only have curves and closed shapes as in the example above or can it be a wild jumble of shapes and lines and curves? – BgRva Oct 29 '13 at 17:44
  • You might have some success with edge detection and then following those edges checking gradients for smooth changes in those gradients and then ensuring that the edges don't close? – Mark Jerzykowski Nov 12 '13 at 22:55

1 Answers1

1

I suggest the following issue:

We can take any point on the drawing and then start moving to any direction (in terms of - take second drawing point, third, fourth, …) After each step we check: if we already have been in this point or not.

If yes – the drawing is closed.

If there are no more points to check – the drawing is not closed.

Lebedev Alexei
  • 121
  • 1
  • 1