How to calculate the length of the longest crack in this image automatically ?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens

How to highlight those cracks in this image and calculate their lengths?
2 commentaires
Image Analyst
le 26 Déc 2024
Modifié(e) : Image Analyst
le 26 Déc 2024
It's complicated by the fact that the really long crack crosses over dark circular regions. Do you consider the crack to end when it hits a round dark region? Or do you want it to continue through it? Please annotate the image with red lines showing exactly where each crack is.
Jayanti
le 27 Déc 2024
Hi,
Please refer to the below links on calculating crack length which might be useful for you:
Additionally, you can refer to the below link for calculating crack area, width, and length:
Réponse acceptée
KALYAN ACHARJYA
le 29 Déc 2024
Modifié(e) : KALYAN ACHARJYA
le 29 Déc 2024
img = imread('image_crack.png');
% Enhance contrast
enhancedImg = imadjust(grayImg);
% Apply Gaussian filter to reduce noise
smoothedImg = imgaussfilt(enhancedImg, 2);
% Binarize the image using a manually set threshold
binaryImg = imbinarize(smoothedImg,0.32);
%figure, imshow(binaryImg);
%get the highest blob
BW = bwareafilt(~binaryImg,1);
figure,imshow(BW);

Appooximate Only: Now, attempt to use a skeleton-based approach or approximating triangles to determine spatial coordinates and calculate the distances.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!