Objects Segmentation in the images

1 次查看(过去 30 天)
Dear All,
now i am analysing the primary particles from aggregates, it is too small, when i use watershed segmentation, which separate overlapp particels not so well, do u have any ideas to improve this problem?
after i use watershed, it shows as below
and i want to show after segmentation, not show like this RRB, but the segmentation lines in the original image.
this is watershed cold i use.
% Distance transform
DT=-bwdist(~DRemove6);
DT(~DRemove6)=-Inf;
% Watershed
W=watershed(DT);
imshow(label2rgb(W,'jet','w'))
title('Watershed Transform')
Thanks so much for your advance.
  1 个评论
mohd akmal masud
mohd akmal masud 2023-6-18
you can use image segmenter apps.
Also, you can use avtive contour segmentation
clc;close all;imtool close all;clear;
G = imread('I2_09_4_2_nuclei.jpg');%read your image
imshow(G);
mask = zeros(size(G));
mask(25:end-25,25:end-25) = 1;
imshow(mask);shg;
imshow(G); shg; hold on;
b = bwboundaries(mask, 'noholes');
plot(b{1}(:,2),b{1}(:,1),'r','LineWidth',3);
hold off;
stepsize=10;
for k = 1:400/stepsize
mask = activecontour(G, mask, stepsize);
imshow(G); title(sprintf('Iteration %d',k*stepsize),'FontSize',16);
b = bwboundaries(mask, 'noholes');
hold on;
for k=1:size(b)
plot(b{k}(:,2),b{k}(:,1),'r','LineWidth',3);
end
hold off;
drawnow;
end
imageSegmenter(G);

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2023-6-18
编辑:Image Analyst 2023-6-18

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by