(rgb, 1), 0);Р直接在RGB空间进行图像增强РclearРclcРA=imread('C:\Users\liuxinju\Desktop\maomao.jpg');%读入原始RGB图像Рwhos;Рfigure;Рimshow(A):title('original image');%显示图像Р[r c d]=size(A);%计算图像大小Р%------计算红色分量并显示分解图------%Рred(:,:,1)=A(:,:,1);Рred(:,:,2)=zeros(r,c);Рred(:,:,3)=zeros(r,c);Рred=uint8(red*2.0);Рwhos;Рfigure;Рimshow(red)Рtitle('ponent');Р%-------计算绿色分量并显示分解图-------%Рgreen(:,:,2)=A(:,:,2);Рgreen(:,:,1)=zeros(r,c);Рgreen(:,:,3)=zeros(r,c);Рgreen=uint8(green*2.0);Рfigure;Рimshow(green)Рtitle('ponent');Р%--------计算蓝色分量并显示分解图-------%Рblue(:,:,3)=A(:,:,3);Рblue(:,:,1)=zeros(r,c);Рblue(:,:,2)=zeros(r,c);Рblue=uint8(blue*2.0);Рfigure;Рimshow(blue)Рtitle('ponent'); Р%------------合成-------------%РB(:,:,1)=red(:,:,1);РB(:,:,2)=green(:,:,2);РB(:,:,3)=blue(:,:,3);Рfigure;Рimshow(B):title('composition image')