필터 지우기
필터 지우기

Image Processing - Matching holes of an industrial part

조회 수: 2 (최근 30일)
kannan kathiresan
kannan kathiresan 2017년 5월 12일
댓글: Image Analyst 2017년 5월 16일
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
KSSV
KSSV 2017년 5월 12일
Question not clear.....you have an Autocad image....what code you want to write?
kannan kathiresan
kannan kathiresan 2017년 5월 14일
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.

댓글을 달려면 로그인하십시오.

답변 (2개)

Gautham Sholingar
Gautham Sholingar 2017년 5월 15일
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
kannan kathiresan
kannan kathiresan 2017년 5월 16일
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?

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2017년 5월 15일
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
kannan kathiresan
kannan kathiresan 2017년 5월 16일
Kindly see the answer above. I forgot to attach the images the first time, sorry!
Image Analyst
Image Analyst 2017년 5월 16일
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.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by