Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to get a mean of random images

Subject: How to get a mean of random images

From: Steve Smith

Date: 25 Oct, 2010 13:50:06

Message: 1 of 3

Hi all,

I'm new to matlab and was wondering how to get the mean of ten random images,i've created the images like this: -
images =rand(10,10,10);
but when i try to get the mean it doesnt work, i'm not sure of the way to go about this

thanks for any help

Subject: How to get a mean of random images

From: Sean

Date: 25 Oct, 2010 14:02:03

Message: 2 of 3

"Steve Smith" <anicho16@caledonian.ac.uk> wrote in message <ia41ue$4qe$1@fred.mathworks.com>...
> Hi all,
>
> I'm new to matlab and was wondering how to get the mean of ten random images,i've created the images like this: -
> images =rand(10,10,10);
> but when i try to get the mean it doesnt work, i'm not sure of the way to go about this
>
> thanks for any help

For all of them at once:
mean(images(:))

Subject: How to get a mean of random images

From: Roger Stafford

Date: 25 Oct, 2010 14:32:03

Message: 3 of 3

"Steve Smith" <anicho16@caledonian.ac.uk> wrote in message <ia41ue$4qe$1@fred.mathworks.com>...
> Hi all,
>
> I'm new to matlab and was wondering how to get the mean of ten random images,i've created the images like this: -
> images =rand(10,10,10);
> but when i try to get the mean it doesnt work, i'm not sure of the way to go about this
>
> thanks for any help
- - - - - - - -
  If you want the mean value of each of the hundred pixels taken over the ten images, you would do this:

 m = mean(images,3)

assuming the images are indexed in the third dimension.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us