how to find average pixels value from matrix 3*3
2 次查看(过去 30 天)
显示 更早的评论
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...
0 个评论
回答(2 个)
Image Analyst
2014-5-4
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!