MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Calculate an image mean withouth the "mean" command


Hi at all,
first, sorry for the bad english...
i have to calculate the mean of an image without using the command "mean".
with mean i resolve in this way:
[code]a=imread('x.JPG');

[M,N]=size(a);

%mask 5x5
for i=1:M-4
      for j=1:N-4
            c = a(i : i+4 , j : j+4);
            media5(i,j)=mean( c ( : ) );
      end;
end;[/code]

the teacher says that shoul be used more for-cycle, but i have no idea about how implement it.

Thanks in advance



  • Prev by Date: Re: Forcing Certain Algebraic Forms With FullSimplify
  • Next by Date: Re: Using Equal with Real Numbers
  • Previous by thread: Read images embedded in MS ACCESS 2007 File (" .accdb")
  • Next by thread: CDF examples