Image Processing - Matching holes of an industrial part

1 visualización (últimos 30 días)
kannan kathiresan
kannan kathiresan el 12 de Mayo de 2017
Comentada: Image Analyst el 16 de Mayo de 2017
Hey!
So, I have this industrial part which is pretty flat - has about 8-10 holes drilled on it. I want to develop a code such that it can match an Autocad drawing/another master image to show that the holes have been matched. If it does not match, the part gets rejected. How do I go on about this task? I am pretty new to Matlab and coding in general. Thanks in advance!
  2 comentarios
KSSV
KSSV el 12 de Mayo de 2017
Question not clear.....you have an Autocad image....what code you want to write?
kannan kathiresan
kannan kathiresan el 14 de Mayo de 2017
I have to use image processing techniques such as enhancement, segmentation, feature extraction, morphology and template matching to match the number of holes of a part to a master image. The master image can be just another good part or an AutoCAD drawing. I have attached the image for your reference.

Iniciar sesión para comentar.

Respuestas (2)

Gautham Sholingar
Gautham Sholingar el 15 de Mayo de 2017
A good starting point for the issue you are facing is to look at the image segmentation and registration tools available in the image processing toolbox/Computer Vision System Toolbox.
One possible way to approach the issue you are facing is to apply object analysis algorithms to determine the boundaries and/or centroids of the holes in both images and then compare the two sets to determine if holes in the part match the AUTOCAD diagram. 
The following documentation link shows examples of several object analysis algorithms which can be used for this: http://www.mathworks.com/help/images/object-analysis.html
Another useful approach is to perform image registration and look at matched features between the two images using the 'matchFeatures' function from the Computer Vision System Toolbox. The following documentation link shows an example of this:  http://www.mathworks.com/help/vision/ref/matchfeatures.html
  1 comentario
kannan kathiresan
kannan kathiresan el 16 de Mayo de 2017
So, I did Image segmentation of both the good and bad parts as you can see from the attached images. Now with the bent core pin you can clearly see there is a hole missing on the left. Now how do I go on about matching these holes?

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 15 de Mayo de 2017
You forgot to attach the images. Please attach the reference (perfect) image, and some actual images, a perfect part, and some parts that are defective in some way. If your part is somewhat thick, then you might need to use a telecentric lens to get an accurate diameter. Telecentric lenses are somewhat rare and cost about twice as much or more than run-of-the-mill lenses, but they will give you parallel rays so that you will not see the vertical interior sides of the holes.
  2 comentarios
kannan kathiresan
kannan kathiresan el 16 de Mayo de 2017
Kindly see the answer above. I forgot to attach the images the first time, sorry!
Image Analyst
Image Analyst el 16 de Mayo de 2017
So a good part should have 9 holes and anything less is bad. So you need to take your "segmentation" (which is lousy by the way) and use bwareafilt() to extract only the largest blob. Then invert it and call bwareaopen() or beareafilt() again to extract only holes in the acceptable range. Then invert again, call bwlabel() and regionprops() and ask for the Euler number, which can tell you how many holes are in your blob. If it's not 9, you know you have a bad part. See if you can code that up.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by