How to identify and characterize flaky particles in microscope image

Hi there,
I need to perform some measurements on a whole lot of microscope images and hope Matlab could be of any help. I have an idea of what is possible but need some support to get things work properly. So this is was I got:
I already managed to implement some pre-processing of the microscope images (noise elimination, contrast enhancement, ..).
What I need now is the following:
1.) Automatically devide the full height (z-axis) of image into sections of the same height (number of sections to be defined by user) [e.g. 5 sections, blue]
2.) For each section: Identify all enclosed flaky particles and characterize the following features: - Amount of enclosed particles - Number of intersections of particles (particle-particle-contact points) - Mean particle length (major axis) + standard deviation - Mean particle thickness (minor axis) + standard deviation - Min/Mean/Max orientation vector of particles (major axis) or angle between x-axis and major axis of particles
I would appreciate any help on this topic! Thank you very much in advance!
Finally solved!

Answers (2)

doc regionprops - This will tell you how to handle the simple cases (spatially separated flakes)
For the harder ones, with intersections, you'll need a method of distinguishing flakes. You may need to use an edge detection filter e.g. [-1 0 1] to find the vertical flakes and [-1 0 1]' to get the horizontal ones.

6 Comments

Ok, step 1:
Threshold the image. You've got a black n white image, so all you need to do is:
thresholded = image > mean(image(:));
Step 2: find the thresholded objects in the image:
labelled = bwlabeln(thresholded);
Step 3: Get the stats of the objects:
stats = regionprops(labelled,{'Orientation', 'MajorAxisLength', 'MinorAxisLength'} );
What that will give you is something close to what you've asked for. It will tell you "funny things" when you have multiple flakes touching/intersecting. You ought to be able to figure out what's going on by looking at some of the other things that regionprops will tell you. Look at the help for it. (doc regionprops)
Thanks lain - managed to get those statistics out of the image. The only problem now is, as already mentioned by you, that I have multiple flakes intersecting:
I tried some other regionprobs features, but wasnt lucky enough to find a solution for that. How can I detect them efficiently in order to get accurate particle statistics? Any idea?
Many thx in advance!
Theres a function called "watershed", which I haven't delved into that may help.
Dilating/Eroding the imagery might help. (or make it worse)
Passing an edge filter might help in isolating flakes that are close to 90º to each other. eg. image = imfilter(image,[-1 1]);
Do you know anything about the flakes that you can use, like if you know that they can only be "cigar" shaped? - by what metric do you know that the complicated shapes aren't single, individual flakes?
Ok, so from what you've said, I would suggest looking at the "eccentricity" of each of your detected objects, and ignore them if they are too close to 0 (0 being circular).
There won't be a generally best solution, you have to try out different suggestions and find the one that suits your problem. Like Iain suggested, I think it's worth trying to calculate the gradient magnitude in x and y directions, and go from there.
filter = [-1 1]; %an example edge detection filter - not a good one.
filtered = imfilt(image,filter);
imagesc(filtered)

Sign in to comment.

If you look at my Image Segmentation Tutorial in my File Exchange you will see how to use multiple simultaneous filters. Here is a snippet from the tutorial:
% Now I'll demonstrate how to select certain blobs based using the ismember function.
% Let's say that we wanted to find only those blobs
% with an intensity between 150 and 220 and an area less than 2000 pixels.
% This would give us the three brightest dimes (the smaller coin type).
allBlobIntensities = [blobMeasurements.MeanIntensity];
allBlobAreas = [blobMeasurements.Area];
% Get a list of the blobs that meet our criteria and we need to keep.
allowableIntensityIndexes = (allBlobIntensities > 150) & (allBlobIntensities < 220);
allowableAreaIndexes = allBlobAreas < 2000; % Take the small objects.
keeperIndexes = find(allowableIntensityIndexes & allowableAreaIndexes);
% Extract only those blobs that meet our criteria, and
% eliminate those blobs that don't meet our criteria.
% Note how we use ismember() to do this.
keeperBlobsImage = ismember(labeledImage, keeperIndexes);
% Re-label with only the keeper blobs kept.
labeledDimeImage = bwlabel(keeperBlobsImage, 8); % Label each blob so we can make measurements of it
% Now we're done. We have a labeled image of blobs that meet our specified criteria.
subplot(3, 3, 7);
imshow(labeledDimeImage, []);
axis square;
title('"Keeper" blobs (3 brightest dimes in a re-labeled image)');
Adapting it should be pretty straightforward. In general, I agree with Narges M - you may never be able to segment out each individual platelet because there are too many overlapping platelets that would be counted as one blobs with very different measurements that you would have if you were able to separate them. So you can either just throw those out, like lain suggested, or use more of a "bulk measurement" that measures the orientation (isotropy) of the image without having to identify each and every single platelet by itself.

Asked:

on 17 Jul 2013

Edited:

on 2 Mar 2016

Community Treasure Hunt

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

Start Hunting!