Shape matching and distance measuring methods
古いコメントを表示
Here is my original image

This is my fist project regarding image processing so please bear with me. I am trying to
- detect the shape of few fabric shapes, the attached code and image "detected shape" show my effort on this.
- measure measure distance of the shape border, the attached image "measured image" show how i would like to measure my shape. (some method to automatically measure distances like in imtool)
- match those distance values with set values to check if they have correct size. It is a quality check application to test if the cut fabric parts are with in the given tolerance.(+ or - 5 mm)
I have completed shape detection part and searched the internet for months to find method to accurately measure distance in the method shown in "measured image". Please guide me in correct path. thank you
if true
%%read image
I = imread('D:\ICBT files\Bng final project\Test samples\Original pocket.JPG');
%%convert the image into gray image
Igray = rgb2gray (I);
%imshow (Igray)
%%Sobel edge detection
bw = edge(Igray,'Sobel',[0.04],'both','nothinning');
Ifilled = imfill(bw,'holes');
imshow(Ifilled);
%imtool(Ifilled);
end

1 件のコメント
Alex Taylor
2026 年 10 月 8 日 18:07
Several years late getting to this question but as of R2026b there is now edge-based shape matching and subpixel measurement workflows enabled by the Visual Inspection Toolbox.
The examples shown here would be a worthwhile thing to check out that use the new shapemodel and matchshape functionality in Visual Inspection Toolbox for locating objects based on their contour profiles and automating measurements relative to the AnchorPoint defined by a shapemodel.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Object Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
