Issues extracting fibers from an image
Dear Community,
I am trying to extract fibers from a microscopy image:
My most succesfull try looks like this:
image = imread(imagepath);
image = rescale(image);
image = imgaussfilt(image, 0.7);
image = adapthisteq(image, ‘NumTiles’,[100 100],’ClipLimit’,0.1, ‘NBins’, 100);
T = adaptthresh(image,0.9);
image = imbinarize(image,T);
Which results in
As you can see, not all lines are found, and some background noise is wrongfully included. I have also tried edgedetection using all the included algorithms using
methods = {"Sobel", "Prewitt","Roberts","log","zerocross","Canny"};
for k = 1:length(methods)
tmp= adapthisteq(image, ‘NumTiles’,[200 200],’ClipLimit’,0.1, ‘NBins’, 100);
[~,threshold] = edge(tmp,methods{k});
fudgeFactor = 0.7;
edge_detected = edge(tmp,methods{k},threshold * fudgeFactor);
end
all with unconnected lines like in the image below:
Since this is not really my field, I am now running out of ideas. I have played around with morphological operations and skelletonizing, but to no avail. Next I will probably look at specialized software and seed growing approaches, but I wanted to try asking the community first in case I was missing something obvious.
Thank you for your time and Help!Dear Community,
I am trying to extract fibers from a microscopy image:
My most succesfull try looks like this:
image = imread(imagepath);
image = rescale(image);
image = imgaussfilt(image, 0.7);
image = adapthisteq(image, ‘NumTiles’,[100 100],’ClipLimit’,0.1, ‘NBins’, 100);
T = adaptthresh(image,0.9);
image = imbinarize(image,T);
Which results in
As you can see, not all lines are found, and some background noise is wrongfully included. I have also tried edgedetection using all the included algorithms using
methods = {"Sobel", "Prewitt","Roberts","log","zerocross","Canny"};
for k = 1:length(methods)
tmp= adapthisteq(image, ‘NumTiles’,[200 200],’ClipLimit’,0.1, ‘NBins’, 100);
[~,threshold] = edge(tmp,methods{k});
fudgeFactor = 0.7;
edge_detected = edge(tmp,methods{k},threshold * fudgeFactor);
end
all with unconnected lines like in the image below:
Since this is not really my field, I am now running out of ideas. I have played around with morphological operations and skelletonizing, but to no avail. Next I will probably look at specialized software and seed growing approaches, but I wanted to try asking the community first in case I was missing something obvious.
Thank you for your time and Help! Dear Community,
I am trying to extract fibers from a microscopy image:
My most succesfull try looks like this:
image = imread(imagepath);
image = rescale(image);
image = imgaussfilt(image, 0.7);
image = adapthisteq(image, ‘NumTiles’,[100 100],’ClipLimit’,0.1, ‘NBins’, 100);
T = adaptthresh(image,0.9);
image = imbinarize(image,T);
Which results in
As you can see, not all lines are found, and some background noise is wrongfully included. I have also tried edgedetection using all the included algorithms using
methods = {"Sobel", "Prewitt","Roberts","log","zerocross","Canny"};
for k = 1:length(methods)
tmp= adapthisteq(image, ‘NumTiles’,[200 200],’ClipLimit’,0.1, ‘NBins’, 100);
[~,threshold] = edge(tmp,methods{k});
fudgeFactor = 0.7;
edge_detected = edge(tmp,methods{k},threshold * fudgeFactor);
end
all with unconnected lines like in the image below:
Since this is not really my field, I am now running out of ideas. I have played around with morphological operations and skelletonizing, but to no avail. Next I will probably look at specialized software and seed growing approaches, but I wanted to try asking the community first in case I was missing something obvious.
Thank you for your time and Help! image, image analysis, image processing, edge detection, masking, fibers, thresholding MATLAB Answers — New Questions