Image Processing - Matching holes of an industrial part
2 ビュー (過去 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 件のコメント
KSSV
2017 年 5 月 12 日
Question not clear.....you have an Autocad image....what code you want to write?
回答 (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!