Ask Your Question
0

Best method to detect number of holes in part?

asked 2016-12-17 13:43:10 -0600

jamey270 gravatar image

I'm working on a project that takes a picture of a part (brass part with multiple holes in it, see link) and then I would like to use OpenCV 3.1 to locate and count the holes.

I'm pretty new to OpenCV and could use some pointers into which method I should look into for accomplishing this task. Ideally, the program would locate the circles and do the work for me (I've had little luck thus far; using finding contours and hough circle sample code). Currently using C++.

Is OpenCV even capable of solving this problem?

Thanks in advance for any tips you can provide, Jamey

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2016-12-17 15:00:57 -0600

LBerger gravatar image

Not the best method but a method Relative position object and camera must be fixed.

  1. do a linearpolar transform of original image.
  2. may be smooth result to decrease some artefact
  3. extract a vertical section and count maximum

image description

edit flag offensive delete link more

Comments

I think we can maybe make this work! Thanks so much for your input! I've been messing around with this for hours and this seems like a really good option.

jamey270 gravatar imagejamey270 ( 2016-12-17 15:14:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-17 13:43:10 -0600

Seen: 1,331 times

Last updated: Dec 17 '16