Image analysis: Finding the cusp spacing

2 views (last 30 days)
Shan  Kapoor
Shan Kapoor on 20 Sep 2011
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 Comments
Shan  Kapoor
Shan Kapoor on 27 Sep 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 on 27 Sep 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.

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 27 Sep 2011
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.

Tolga Birdal
Tolga Birdal on 23 Jan 2013
Edited: Tolga Birdal on 23 Jan 2013

Community Treasure Hunt

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

Start Hunting!