Detection of holes

asked 2019-03-13 15:01:26 -0500

claude gravatar image

Im working on a project where we are trying to detect features, particularly the center of the terminals of electrical components. Following are some examples:

image description image description image description image description image description

The constraints of our system allow us to make the assumption that the terminal which we are seeking is the most centered of all the features seen. Other than that no additional information is available about individual components. Im trying to come up with a basic strategy to approach this problem.

So far my idea is to try to search for rectangle shapes and elliptical shapes and then select the ones closest to the center of the camera. This should work ok for single contact terminals, however for double contact terminals with two overlapping ovals, or joined rectangles this wont work. Can someone give me some pointers on how i might go about developing a stable algorithm to detect the center points of any terminal?

Regards

edit retag flag offensive close merge delete

Comments

I prefer these methods to Hough transform:

link text

I was able to get repeatable and robust results, but my input images were much higher contrast so it was easier to get a well defined edge. It would handle intersecting circles (partial circles, or multi-piece circles) well, but it is based on having a good edge image to start with.

In your case I would start with getting a good edge image from your input images, then try to get circles from that. If you can filter based on size, that will help.

You also have a good amount of perspective (the first image, for example), so you might find the opening of the terminal, but not the terminal itself. Is a telecentric lens an option?

swebb_denver gravatar imageswebb_denver ( 2019-03-14 14:56:51 -0500 )edit