clear all; close all; clc; img=imread('Lena_cai.jpg'); imshow(img); mean1=mean(mean(img(:,:,1))); mean2=mean(mean(img(:,:,2))); mean3=mean(mean(img(:,:,3))); me=mean(mean(mean(img))); img(:,:,1)=me/mean1*img(:,:,1); img(:,:,2)=me/mean2*img(:,:,2); img(:,:,3)=me/mean3*img(:,:,3); figure,imshow(img); 参考: http://www.ilovematlab.cn/thread-109633-1-1.html |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论