how to identify the cracks from the image

3 Comments

Have you tried so far? For that, you have to do some sorts of coding. How to get the fast and proper answer here
I do have coding in image processing but not to detect the cracks in a segment ways
provide me the help if possible.

Sign in to comment.

Answers (2)

Try something like a bottom hat filter, imbothat(), then threshold and use regionprops() to thrown out blobs that are vertical. If a slanted crack touches a vertical crack, then you'll have to split them apart with something like watershed.

10 Comments

thanks sir, but can you help me showing some examples of coding because it contains all types of cracks like parallel, perpendicular,all direction etc.
It would probably take more time than I can donate to you, if I were to write a turnkey solution for this. You can see my Image Segmentation Tutorial to get started. https://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862&sort=downloads_desc
Other than that you can take horizontal and vertical profiles
verticalProfile = mean(grayImage, 2);
horizontalProfile = mean(grayImage, 1);
to try to find the straight lines, which will appear as dips in the profiles. I've done this before so search the forun for "horizontalProfile". Try to find those line and then use regionfill() or something to try to fill them in with the surrounding gray levels and make them disappear. Then all you should have left are the lines at angles.
Sir,
Thanks for your support but I'm stuck while coding and unable to find the exact cracks in the exact portion of the cells. Please help me to solve my problem.
Sir, there are 72 cells in the image and I have to segment each of them and find the cracks. Even if there is one, deactivate the cell with the black color. I am facing problem while doing so. I have seen your example https://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862&sort=downloads_desc How beautiful you did. Help me to do so sir.
Sir, thanks for everything but i want the coding in this way as it is attached picture
sir, i Want for each and every cell including dark cell in the above picture. My analysis is to detect the cracks in each cell of the module.
Yes, I know that already.
If you need it right away and don't want to write it yourself, the Mathworks will happily write it for you. See this link But it's not something that is a quick 5-minute solution that I'm going to bang out for you on a Sunday afternoon.
Of course you could just do manual inspection with imfreehand(), and if the crack detection is really what's important to you rather than developing an image analysis algorithm, then you can do that.
What is this material anyway? If it's semiconductor surfaces, you can look at KLA Tencor which makes semiconductor image analysis systems.
Sir, I mean that with image analysis i want to detect the cracks and the faults.Sir even I don't want a fast solution it should it be effective and accurate. I am also trying to develop an algorithm on it.
I understand. You're main goal is "trying to develop an algorithm" (programming) rather than material science. Like developing the algorithm is a main part of your Masters thesis or Ph.D. dissertation. So you don't want to buy, or have someone give you, the algorithm because you need to develop it yourself, for your degree. Good luck. Perhaps what I gave you might be a good start.
Thanks for everything..

Sign in to comment.

Preetham Manjunatha
Preetham Manjunatha on 7 Jan 2025
Edited: Preetham Manjunatha on 16 May 2025
The image looks quite intricate with regular structures like lines. As @Image Analyst mentioned morphological methods might help to mitigate the non-cracks entities. Here is the MATLAB Crack segmentation and Crack width, length and area estimation codes to calculate/estimate the crack area, width and length. Please try with the morphological crack detection method to get started with. Gradient-based crack segmentation methods can pick the lines heavily in comparision to the morohological approach. Lastly, the semantic segmentation and object detection metrics for the cracks can be found using Cracks binary class bounding box and segmentation metrics package.

Categories

Products

Release

R2017b

Asked:

on 24 Aug 2018

Edited:

on 16 May 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!