Image Processing Reference
In-Depth Information
con1=0.8;
n1=fix((1/z1)*n);   % mean of the background region
%computing the membership values of pixels in each window
using restricted equivalence function
for i=1:dim3
for j=1:dim4
if c(i,j)<p
mem(i,j) = 0.582*(exp(1-abs(c(i,j)-m1)/255)-1);
mem(i,j)= mem(i,j);
nonmem(i,j)= (1-mem(i,j))/(1+con1*mem(i,j));
hes(i,j)=1-mem(i,j)-nonmem(i,j);
mem2(i,j)= mem(i,j)+ hes(i,j);
else
mem(i,j) = 0.582*(exp(1-abs(c(i,j)-n1)/255)-1);
mem(i,j)= mem(i,j);
nonmem(i,j)= (1-mem(i,j))/(1+con1*mem(i,j));
hes(i,j)=1-mem(i,j)-nonmem(i,j);
mem2(i,j)= mem(i,j)+ hes(i,j);
end
end
end
% finding optimum threshold using intuitionistic fuzzy divergence
u1=0.0;
for i=1:dim3
for j=1:dim4
h= 2-(2-mem(i,j))*exp(mem(i,j)-1)-mem(i,j)*exp(1-mem(i,j))+...
2-(2-mem2(i,j))*exp(mem2(i,j)-1)-(mem2(i,j))*exp(1-
mem2(i,j))+u1;
u1=h;
end
end
div=h;
div_vec = [mun;div];
mun = div_vec;
h1(p)= div;
end
div_vec;
l=min(h1(mn:mx));
[p]=find(l==h1);
medp=mean(p); % optimum threshold
imgbw=zeros(size(img));
imgbw(find(img>medp-0.25*stdf1))=1;
finim=[mun1,imgbw];
mun1=finim;
end
finimage1=[mun2;finim];
mun2=finimage1;
end
figure,imshow(finimage1)
Search WWH ::




Custom Search