Image processing: Determine fiber diameter
Dear reader,
A fabricated fiber structure is made visible using a SEM. The fibers in these images needs to be analyzed: I’m especially interested in the fiber thickness. It would be nice to write a Matlab-script that could do the image analysis and provides a histogram of the determined fiber thicknesses. An example of such a SEM-image is found below.

Using image thresholding and morphological opening- and closing, a binarized figure is obtained. This image is used for edge detection and skeletonization. The figure below shows the image that is obtained

The upper figure is obtained using the following code
clear all; close all; clc
I = imread('ZnAcetate.tif');
se1 = strel('disk',4);
se2 = strel('disk',1);
BI = imbinarize(I,0.4); filter1 = imclose(BI,se1); filter2 = imopen(filter1,se2); inverse = imcomplement(filter2); ED = edge(filter2,'Sobel');
skel = bwmorph(filter2,'skel',Inf);
BP = bwmorph(skel, 'branchpoints'); EP = bwmorph(skel, 'endpoints');
[y,x] = find(EP);
BP_L = find(BP);
Dmask = false(size(skel));
for k = 1:length(x)
D = bwdistgeodesic(skel,x(k),y(k));
distanceToBranchPt = min(D(BP_L));
Dmask(D < distanceToBranchPt) = true;
end
skel = skel - Dmask;
figure(1) muxing = ED | inverse; imshowpair(muxing,skel,'blend')
At this stage, the normal distance between two parallel lines needs to be determined. The center line of each fiber should be used to determine the thickness between two real edge lines.
I have been searching the net, but I could not find a real useful example that could be implemented in this particular case. I guess a distance transformation needs to be used to determine the fiber thicknesses.
Does somebody have any suggestion how to tackle this problem?
Thank you in advance!
Kind regards,
Bjorn
0 Kommentare
Antworten (8)
0 Kommentare
- Compute the Euclidean distance transform with bwdist()
- Compute the skeleton with bwmorph()
- Multiply them together.
- Take the histogram of that product image to get the radius distribution.
- Multiply the radius values by 2 to get diameter values.


0 Kommentare
0 Kommentare
1 Kommentar
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!