Finding crack path using image processing
4 ビュー (過去 30 日間)
古いコメントを表示
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);
imshow(Igray)
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);
imshow(BW1&BW2)
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?
0 件のコメント
回答 (1 件)
Anmol Dhiman
2021 年 2 月 3 日
Hi Waqas,
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
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!