How i can calculate row wise avg of an image??

4 次查看(过去 30 天)
temp1 = double(imread('im1.JPG')); %img1.jpg is a 240*20 pixels in size;
%expected output 240 rows with single column with avg or mean ;
output= mean(temp1,240)

采纳的回答

Thorsten
Thorsten 2015-6-30
output = mean(temp1, 2);
  4 个评论
Thorsten
Thorsten 2015-6-30
I interpreted 240*20 as row x column; if it is x * y, you can use Stephen's code or simply
output = mean(temp1);

请先登录,再进行评论。

更多回答(0 个)

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by