Image Processing - Matching holes of an industrial part
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (2개)
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
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
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!