Effacer les filtres
Effacer les filtres

How to isolate inner branch structure (similar to bulk background color) from ring of dark gray?

3 vues (au cours des 30 derniers jours)
I am trying to segment the inner gray branch structure from an outer darker gray noise, but I am struggling because the outer background color is similar in color to the inner structure. The original image is on the left and my attempt at isolation is on the right. How do I improve my image segmentation to only include the inner branches and remove all the other noise?
This is what I have so far:
I = imread('end.tif');
smooth = imgaussfilt(I, 5);
im = imbinarize(smooth,'adaptive','Sensitivity',.62,'ForegroundPolarity','dark');
se = strel('disk',2);
im0 = imerode(im,se); % break up the bg
im0 = bwareafilt(im0,1); % isolate primary object
im0 = imdilate(im0,se); % restore
im = im-im0;
im = imfill(im, 'holes');
imshow(im,[])
I also have multiple frames of this (stored as .tif files), where the branches are growing over time. I want to track change in area over time, and would like guidance on that as well! In the 'sample images.zip', I included a sample start and end .tif images where I'd like to track changes in branch area over time.

Réponses (1)

Image Analyst
Image Analyst le 18 Mar 2024
I could maybe do a better job than that, but unfortunately you forgot to attach the actual image, image.tif. If you still need help, attach a few images with the paperclip icon after you read this:
I'm not sure how your images are stored. Are they in a video as frames of that video? If so, see my attached video processing demo.
If it's just a sequence of individual images in a folder, then see the FAQ:
  1 commentaire
Jessica
Jessica le 18 Mar 2024
It is a sequence of individual images in a folder, thank you! I just attached the start.tif and end.tif files in the 'sample images.zip'. I still am having issues with the image segmentation part, especially with taking out the unwanted noise. Are there better methods to isolate the inner light gray branches?

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by