Image Processing Reference
In-Depth Information
 dim3=dim1/8;dim4=dim2/8;
 %computing mean for each window based
mun2=[];
mun=[];
for i1=1:dim3:dim1
mun1=[];
for i2=1:dim4:dim2
img1=imcrop(im1,[i2 i1 dim4-1 dim3-1]); 
img=double(img1);
mx=max(max(img))+1;
mn=min(min(img))+1;
c=double(fix(img));size(c);
stdf1=std2(img);
for p=mn:mx
s=0.0;
for b=mn:p
z=count(b)+ s;
s=z;
z;
end
z;
s1=0.0;
for b=p+1:mx
if p<mx
z1=count(b)+s1;
s1=z1;
z1;
else
 z1=0.0;
end
z1;
end
z1;
t=0.0;
for b=mn:p
m =count(b).*(x(b)-1) +t;  
t = m;
end
m;
m1=fix(m*(1/z));  % mean of the object region
u=0.0;
for b=p+1:mx
if p<mx
n = count(b).*(x(b)-1)+ u;
u = n;
else
n=0.0;
end
end
n;
Search WWH ::




Custom Search