Finding crack path using image processing
2 views (last 30 days)
I have previously asked a question of this forum (link to it) where I want to find the path of a crack using image processing. However, the same method is not working for my current implementation. Following the is the sample code (for the attached .mat file) that I am using:
Igray = mat2gray(V);
th = multithresh(Igray,2);
Iseg = imquantize(Igray,th);
se = strel('disk',1);
BW1 = bwperim(Iseg == 1);
BW1 = imdilate(BW1,se);
BW2 = bwperim(Iseg == 2);
BW2 = imdilate(BW2,se);
BW3 = bwperim(Iseg == 3);
BW3 = imdilate(BW3,se);
In another implementation, I get the results as shown in the figure below but they are not what I am looking for either. This figure is based on another method which is not robust.
How can make the code more robust to use the field in the mat file so that it would work for different cases?
Anmol Dhiman on 3 Feb 2021
The approach mentioned in the attached questions.seems robust enough and it should work for most of the cases.
There is no general approach for all images. It can happen that same approach might not give results for some images.
Try on multiple images to determine effectiveness of an approach.
Hope it helps