Ask Your Question

Revision history [back]

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.

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) is)

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