How to isolate inner branch structure (similar to bulk background color) from ring of dark gray?
1 次查看(过去 30 天)
显示 更早的评论
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,[])
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1644551/image.png)
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.
0 个评论
回答(1 个)
Image Analyst
2024-3-18
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:
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!