I want to write the region growing algorithm....
Show older comments
function regrow(x)
f= medfilt2(f); figure,imshow(f)
s=1;
t=graythresh(f);% finding threshold value if numel(s)==1 si=f==s; s1=s; else si=bwmorph(s,'shrink',Inf);% morphological operations j=find(si); s1=f(j); end ti=false(size(f));% find the contour for k=1:length(s1) sv=s1(k); s=abs(f-sv)<=t; ti=ti|s; end [g nr]=bwlabel(imreconstruct(si,ti));% reconstruct the lable figure,imshow(f1),title('Original Image');% image show as out put figure,imshow(g),title('Segmented Image - Region Growing'); display('No: of regions'); nr %end
Answers (0)
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!