clc
clear
I1=imread('1.bmp');
% I2=imread('2.bmp');
% I3=imread('3.bmp');
I4=imread('4.bmp');
% I5=imread('5.bmp');
% I6=imread('6.bmp');
figure,imshow(I1);
% figure,imshow(I2);
% figure,imshow(I3);
figure,imshow(I4);
% figure,imshow(I5);
% figure,imshow(I6);
P1=rgb2gray(I1);
% P2=rgb2gray(I2);
% P3=rgb2gray(I3);
P4=rgb2gray(I4);
% P5=rgb2gray(I5);
% P6=rgb2gray(I6);
% figure,imshow(P1);
% figure,imshow(P2);
% figure,imshow(P3);
% figure,imshow(P4);
% figure,imshow(P5);
% figure,imshow(P6);
% g=ice('image',I1,'space','hsi');
F=fronghe(P1,P4);
figure,imshow(uint8(F));
% figure,imshow(uint8(P2));
for i=1:3
S1=I1(:,:,i);
S4=I4(:,:,i);
PP(:,:,i)=fronghe1(S1,S4);
end
sx=max(max(PP(:,:,1)));
PP(:,:,1)=PP(:,:,1)*255/sx;
sx=max(max(PP(:,:,2)));
PP(:,:,2)=PP(:,:,2)*255/sx;
sx=max(max(PP(:,:,3)));
PP(:,:,3)=PP(:,:,3)*255/sx;
figure,imshow(uint8(PP));
% I=fronghe2(I1,I2);
% I=fronghe2(I,I3);
I=fronghe2(I1,I4);
% I=fronghe2(I1,I5);
% I=fronghe2(I1,I6);
figure,imshow(I);