From: shilpa khinvasara on
can u pls check the following code for the mean of the image

[s t]=size(q);
ss=s(1);
y=zeros(ss);
i=1;j=1;
for n=1:1:t
for m=1:1:s
y(m,n)=q(i,j);
i=i+1;
end;
i=1;
j=j+1;
end
h1=[1 1 1;1 1 1;1 1 1];
a1=conv2(y,h1);
%mea = mean(mean(a1));
figure;
subplot(2,2,1);
imshow(x);
subplot(2,2,2);
imshow(a1);
subplot(2,2,3);

hist(a1(:),max(a1(:)));
From: Airballman on
"shilpa khinvasara" <ship(a)gamil.com> wrote in message <i2oe90$44v$1(a)fred.mathworks.com>...
> can u pls check the following code for the mean of the image
>
> [s t]=size(q);
> ss=s(1);
> y=zeros(ss);
> i=1;j=1;
> for n=1:1:t
> for m=1:1:s
> y(m,n)=q(i,j);
> i=i+1;
> end;
> i=1;
> j=j+1;
> end
> h1=[1 1 1;1 1 1;1 1 1];
> a1=conv2(y,h1);
> %mea = mean(mean(a1));
> figure;
> subplot(2,2,1);
> imshow(x);
> subplot(2,2,2);
> imshow(a1);
> subplot(2,2,3);
>
> hist(a1(:),max(a1(:)));

Hi,

What would be the problem with the function mean2 ?
 | 
Pages: 1
Prev: rotating?
Next: LARGE array indexing