Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Calculate an image mean withouth the "mean" command

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123183] Calculate an image mean withouth the "mean" command
  • From: sfalanzo <iwannasgheppa at hotmail.it>
  • Date: Fri, 25 Nov 2011 04:58:18 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

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