Filter löschen
Filter löschen

how to find average pixels value from matrix 3*3

1 Ansicht (letzte 30 Tage)
asthana
asthana am 4 Mai 2014
Beantwortet: Youssef Khmou am 4 Mai 2014
hello i have the 3*3 matrix now i want to find the average value of it. the image is in gray color. so how to do same...

Antworten (2)

Image Analyst
Image Analyst am 4 Mai 2014
For one array:
meanValue = mean2(array3by3);
To do it for every pixel in an entire image:
meanImage = imfilter(grayImage, ones(3)/9);
This produces an output image where every pixel is the average of the 9 pixels at the same location in the input image.

Youssef  Khmou
Youssef Khmou am 4 Mai 2014
try :
H=mean(M(:));

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by