Objects Segmentation in the images

1 view (last 30 days)
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 Comment
mohd akmal masud
mohd akmal masud on 18 Jun 2023
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);

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 18 Jun 2023
Edited: Image Analyst on 18 Jun 2023

More Answers (0)

Community Treasure Hunt

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

Start Hunting!