Ask Your Question
2

Is possible find arbitrary shape with Hough transform?

asked 2015-01-07 09:56:42 -0600

AndrzejB gravatar image

In imgproc.hpp are functions: HoughLines,HoughLinesP (probabilistic), HoughCircles, but I want find ellipses with narrowness, like digit 8. How can I modify sources of HoughCircles to find this?

edit retag flag offensive close merge delete

Comments

Digit 8 may be considered as two circles. Show your shapes to clarify your case plz.

Vit gravatar imageVit ( 2015-01-07 15:44:56 -0600 )edit

In http://i.imgur.com/ze0Pw2v.png are unregular, 8-like are 19,222,and 231, especially 19. Rest is not 8-like. How distinguish?

AndrzejB gravatar imageAndrzejB ( 2015-01-08 03:06:53 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
3

answered 2015-01-08 05:49:19 -0600

updated 2015-01-08 05:50:49 -0600

I am afraid there is no out of the box Hough-type solution for your case -- see Hough method description on wiki, it is not a magic wand. In your case morphology and shape analysis could help. I'd try this as:

  • find bounding rectangle or ellipse (or moments) to understand shape properties like linear sizes, symmetry etc
  • do some dilation iterative steps with size according to shape size ( 1/16..1/4 of height and/or width)
  • check is is still one connected area or there are already 2 or more black inside areas -- if there are 2 areas, we have 8-like shape (the less dilation window size in % of shape size/width/height -- the more 8-like it is)

It is just core idea but for you 19,222,and 231 pictures it will work.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-01-07 09:56:42 -0600

Seen: 647 times

Last updated: Jan 08 '15