Image analysis: Finding the cusp spacing

Hi all,
I am stuck with an issue.Please forgive and redirect me if these type of problems are already addressed.
Please refer the following picture, https://picasaweb.google.com/116243239493929305987/ImageAnalysis#5654551982275072578, I would like to measure the spacing between the cusps of the long black laths...Right now I am doing it manually by drawing a bisector to the lath and measuring the length to the hill and the valley ( as shown in red line in figure). As analysing hundreds of images in this way is a huge task, it will be of great help if you give me some guidance on how to automate this thing in matlab. Thanks in advance

8 comentarios

Image Analyst
Image Analyst el 20 de Sept. de 2011
I find it hard to figure out where you decided to start and stop your red lines. And many of your long black laths seem connected.
Walter Roberson
Walter Roberson el 20 de Sept. de 2011
I agree: I could not see the logic of where the red lines were to be drawn or not.
Shan  Kapoor
Shan Kapoor el 23 de Sept. de 2011
Hi Image Analyst,
A little bit of subjectivity arises to decide on where to start and stop the red line. Technically it shouldnt matter much. If you see the image carefully we can note that the black lath is again divided into near globular portions ( we call it subgrain). Out primary aim is to measure the roughness and cusp spacing of these. Lines are drawn manually perpendicular to the axial line to the peaks and valleys of the interface ( As you can see in the image)and the height difference between peaks and valleys is defined as the roughness. The spacing between the valleys is reported as a measure of cusp spacing. I would like to bring your attention to these two quantities by completely eliminating the red line thing.
Shan  Kapoor
Shan Kapoor el 23 de Sept. de 2011
Dear Walter,
you are right. The red lines are drown just to analise it manually. The ultimate aim is to measure Roughness and Cusp spacing.
Walter Roberson
Walter Roberson el 23 de Sept. de 2011
I do not seem to be able to make any sense of the choices for red lines under the assumption that the black lath corresponds to globular portions. The positions of the red lines in the image would make much more sense to me under the following hypothesis:
Imagine that the black areas correspond to material that rises out of the plane of the screen; imagine that the material is fine-grained enough to have a near-constant slope angle (e.g., akin to sand-dunes), and thus that a wider area corresponds to a local peak and a narrower area corresponds to a local valley. In such a situation, the local minima of the boundaries of the black regions would correspond to local valleys, and the local maxima of the boundaries of the black regions would correspond to local peaks. Smooth the edge of the boundary first to avoid noise, find the minima and maxima, and draw the perpendiculars at each.
The hypothesis does break down a bit for the large lath that extends from roughly the horizontal center on rightward, but one lath upward from the vertical center; the long lath with very few perpendiculars on its upper left. That lath shows an obvious grain structure with sharp edges (which would be evidence against the globular material explanation.) The puzzle there is as to why there are not some perpendiculars near-ish to the grain boundaries, as they clearly represent some kind of cusp; also there is a local minima on the upper left portion that is not given a perpendicular even that there are other locations on the image were smaller relative minima are marked.
Image Analyst
Image Analyst el 23 de Sept. de 2011
I'm afraid I can't help you. Looking at the very large mass in the lower right, you have 4 regions identified by the red lines and I can't figure out at all how you got them when it looks like one big connected mass and not 4 smaller masses that are just barely touching, at least to my eyes. Good luck with that.
Shan  Kapoor
Shan Kapoor el 27 de Sept. de 2011
I would like to attract your attention to one of a more general problem I have.
Please refer the following figure
https://picasaweb.google.com/116243239493929305987/September282011#5657129963092700050
This is a "recrystallised specimen" after "thermomechanical processing". Initially the black laths were resting in white matrix like zebra lines and after " recrystallization", a maor percentage of the black laths broak into near globular portions as indicated in blue circle in figure. we are interested in finding the percentage of globular black fellows. As a manual method, we are putting an aspect ratio of 3:1 and whatever exceeds that are not counted. the problems are,
1. its a visual judgement, manually I am counting all the portions indicated inside blue circle. I am excluding the portions indicated in red.
2. Portions indicated inside green circle (due to contrast difference) are included in manual method though the boundary of black with the white is not well defined.
3. I exclude portion indiacated inside red in manual method.
Please help...
Image Analyst
Image Analyst el 27 de Sept. de 2011
I'm sorry but this if far too involved and complicated to answer in an online message. And I can't take on a paid consulting job like this right now. I still don't know what you're looking for and I couldn't even do it manually if I had to. Even for you I bet there are a huge number of judgment calls on what is or is not a feature you want to count. If and when you do figure it out you could probably get a paper out of it.

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 27 de Sept. de 2011

0 votos

When you say "putting an aspect ratio", do you mean you are excluding any black area whose major to minor axis ratio exceeds 3 ?
It appears to me that the automatic steps consists approximately of the following:
Binarize with a low threshold that converts gray and upwards to white. It might be a bit tricky to have the gray area in the upper left blue circle left out (converted to white) but not the circular-like gray area in the upper center blue circle. If a good simple threshold cannot be found, then you might need to use more advanced techniques based upon contrast with adjacent areas. "watershed" filtering perhaps.
Once you have the binary image, negate it (0->1, 1->0), so that the solid black crystals become solid white and everything else becomes a formless mass of black.
label the image; bwlabel() is the older routine and I have not memorized the name of the newer routine yet
Let the ratio of permitted major axis to minor be R -- e.g., 3 in your case. Define g = (R-1)/R. Then calculate the eccentricity, e, of the ellipse is sqrt(g*(2-g)). For R=3, you should come out with e = 2/3 * sqrt(2), I calculate.
regionprops() the labeled image. Throw away all portions whose eccentricity as measured by regionprops is greater than e
If you like, add additional "common sense" rejection of the regions, such as throwing out areas too small or too large to be relevant.
In theory, with luck, what remains should be information about the globular regions.
It would not surprise me if, after you negated the thresholded image, you had to do an imerode step to separate adjacent regions better.

Preguntada:

el 20 de Sept. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by