Filter löschen
Filter löschen

How to find mean of the image

1 Ansicht (letzte 30 Tage)
Jim
Jim am 13 Sep. 2011
Hi,
I am using this command for finding mean of the 10 images
mean(cat(3,IMG1,IMG2,IMG3,IMG4,IMG5,IMG6,IMG7,IMG8,IMG9,IMG10),3)
Here 3 is the dimension
Why to use 3 dimension here?
When I am using 2 dimensional I am not getting the answer.why?
can u suggest something about this
Thanks in advance

Akzeptierte Antwort

Wayne King
Wayne King am 13 Sep. 2011
What dimension do you want to concatenate along and how do you want to take the mean?
X = mean(cat(2,randn(10,2),randn(10,2)),2);
Forms a matrix that is 10x4 and then takes the means of the rows to yield a 10x1 vector.
X = mean(cat(1,randn(10,2),randn(10,2)),1);
Forms a matrix that is 20x2 and takes the means of the columns to yield a 1x2 vector.
Wayne
  1 Kommentar
Jim
Jim am 21 Sep. 2011
Hi,
Thank you for your reply,it worked
I need to remove pixels with zero pixel value in an image(dead pixels)
Can you suggest me something about this
Thanks in advance

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by