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!
