seed region growing algorithm code in matlab
#1

Hi. I need SEED algorithm codes in MATLAB. (Complete codes)
Please help me
Reply
#2

clc;clear all;close all;
r=imread('e:\IMAGES\pears.jpg'); % read the image
[rows columns numberOfColorChannels] = size®;
if numberOfColorChannels > 1
r = rgb2gray®; % converting image to grayscale
else
r = r; % It's already gray.
end
[row col]=size®
g=zeros(row,col);
I=zeros(size®);
I=r;
S=zeros(size®);
S(80:82,172:174)=ones(3,3); %initial seed image
figure,imshow(S),title('Initial Seed Image')
T=50; %threshold value
r=double®;
w = [1 1 1;1 1 1;1 1 1 ];
SI=size®
p=size®;
for x=2:1:p(1)-1
for y=2:1:p(2)-1
a1=[w(1)*S(x-1,y-1) w(2)*S(x-1,y) w(3)*S(x-1,y+1) w(4)*S(x,y-1) w(5)*S(x,y) w(6)*S(x,y+1) w(7)*S(x+1,y-1) w(8)*S(x+1,y) w(9)*S(x+1,y+1)];
AI(x,y)=min(a1);
end
end
SI= padarray(AI,[1 1],'symmetric','post')
SI=uint8(SI)
J=find(SI);
S1=r(J); % seed value obtained from SI
seedvalue=S1;
S=abs(r- seedvalue)<= T; % thresholding the absolute difference between original image & seed value
figure,imshow(S),title('thresholding output')
for p=1:1:row
for q=1:1:col
if(SI(p,q)==1)
for n=q:1:col
if S(p,q)==S(p,n)
g(p,n)=1;
end
end
for n=qSad-1):1
if S(p,q)==S(p,n)
g(p,n)=1;
end
end
for n=p:-1:1
if S(p,q)==S(n,q)
g(n,q)=1;
end
end
for n=p:1:row
if S(p,q)==S(n,q)
g(n,q)=1;
end
end
for n1=p:1:row
for n2=q:1:col
if S(p,q)==S(n1,n2)
g(n1,n2)=1;
end
end
end
for n1=p:1:row
for n2=qSad-1):1
if S(p,q)==S(n1,n2)
g(n1,n2)=1;
end
end
end
for n1=p:-1:1
for n2=qSad-1):1
if S(p,q)==S(n1,n2)
g(n1,n2)=1;
end
end
end
for n1=p:-1:1
for n2=q:1:col
if S(p,q)==S(n1,n2)
g(n1,n2)=1;
end
end
end
end
end
end
g=uint8(g)
SE = ones(1,1);
g =bwlabel(imdilate(g,SE),8);%reconstructing the image
%g=logical(g)
%I(g)=0
%figure,imshow(I),title('Final Output')
Lrgb = label2rgb(g);
figure, imshow(Lrgb)
title('output of region growing process')
figure, imshow(I), hold on
himage = imshow(Lrgb);
set(himage, 'AlphaData', 0.3);
title('final output superimposed on original image')
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: matlab code forautomatic seed point detection in medical image, who is col ichabod conk, seed region growing algorithm code in matlab, seed to tree growing matlab animation source code file, hybrid algorithm for region filling after removal of the photograph, seeded region growing algorithm matlab, region filling algorithm for lacuna image,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  image encryption and decryption using rsa algorithm in matlab 2 8,075 29-05-2017, 04:17 PM
Last Post: Priyanka Bidikar
  download liver tumor ct scan image in matlab with source code 4 8,229 21-05-2017, 09:54 PM
Last Post: abdulrahmanmashaal
  MATLAB codes needed for powerline communication 1 8,239 12-04-2017, 05:00 PM
Last Post: jaseela123d
  source code for task scheduling using genetic algorithm using java 2 8,692 11-04-2017, 08:31 PM
Last Post: Guest
  vhdl code for radix 2 modified booth algorithm 4 1,032 04-04-2017, 10:24 AM
Last Post: Garlapati nikitha
  matlab code for wavelet based ofdm transmitter 1 937 24-02-2017, 11:18 AM
Last Post: ijasti
  code to extract brain tumor detection using matlab 2 1,086 17-10-2016, 04:32 PM
Last Post: girish123ak
  secure chat using RSA algorithm karthik1218 2 2,600 14-10-2016, 02:48 PM
Last Post: info togel
  f5 algorithm steganography matlab code 2 886 04-10-2016, 03:00 AM
Last Post: [email protected]
  color image segmentation using jseg algorithm in matlab code 2 888 29-09-2016, 12:07 PM
Last Post: Guest

Forum Jump: