标签:img show 图像 for imshow min close avg read
clear all; close all; clc img=imread(‘lena.bmp‘); figure; imshow(uint8(img)); [m n]=size(img); img_max=0; img_min=256; img_avg=0; for i=1:1:m for j=1:1:n if img(i, j)<img_min img_min=img(i,j); end if img(i, j)>img_max img_max=img(i,j); end img_avg=img_avg + uint8(img(i,j)); end end img_avg=uint8(img_avg/(m*n)); img_max img_min img_avg
标签:img show 图像 for imshow min close avg read
原文地址:http://www.cnblogs.com/love29850706/p/6040824.html