资源描述:
《非均匀性矫正》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、一、图像的非均匀性矫正二、图像增强三、程序代码(MATLAB)%%%%%%%%%%%%%%%%%%%%555555555555555555555555555555555一点矫正HIGH_T=fopen('highdat_151.dat','rb');HIGH=fread(HIGH_T,[200,200],'uint8');HIGH=uint8(HIGH);%类型转化为uint8subplot(321);imshow(HIGH);title('原始高温图像');subplot(322);mesh(double(HIGH
2、));title('原始高温图像三维显示');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%LOW_T=fopen('lowdat_151.dat','rb');LOW=fread(LOW_T,[200,200],'uint8');LOW=uint8(LOW);subplot(323);imshow(LOW);title('原始低温图像');subplot(324);mesh(double(LOW));title('原始低温图像三维显示');%%%%%%%%%%%%%%%%%%%%%%%%
3、%%%%%%%%%%%%%%%%HAND_D=fopen('handdat_60.dat','rb');HAND=fread(HAND_D,[200,200],'uint8');HAND=uint8(HAND);subplot(325),imshow(HAND);title('原始手形图像');subplot(326),mesh(double(HAND));title('原始手形图像三维显示');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%选取低温图进行定标S=mean2(LOW
4、(:));%S为定标值S_LOW=S*ones(200,200);S_LOW=uint8(S_LOW);%S_LOW为定标矩阵D_LOW=LOW-S_LOW;%校正系数D_LOWfigure;HIGH_L=HIGH-D_LOW;subplot(321);imshow(HIGH_L);title('经低温矫正后的高温图像');subplot(322);mesh(double(HIGH_L));title('经低温矫正后的高温图像三维显示');LOW_L=S_LOW;subplot(323);imshow(LOW_L);
5、title('经低温矫正后的低温图像');subplot(324);mesh(double(LOW_L));title('经低温矫正后的低温图像三维显示');HAND_L=HAND-D_LOW;subplot(325);imshow(HAND_L);title('经低温矫正后的原始手图像');subplot(326);mesh(double(HAND_L));title('经低温矫正后的原始手图像三维显示');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%选取
6、高温图进行定标S=mean2(HIGH(:));%S为定标值S_HIGH=S*ones(200,200);S_HIGH=uint8(S_HIGH);%S_LOW为定标矩阵D_HIGH=HIGH-S_HIGH;%校正系数D_HIGHfigure;HIGH_H=S_HIGH;subplot(321);imshow(HIGH_H);title('经高温矫正后的高温图像');subplot(322);mesh(double(HIGH_H));title('经高温矫正后的高温图像三维显示');LOW_H=LOW-D_HIGH;
7、subplot(323);imshow(LOW_H);title('经高温矫正后的低温图像');subplot(324);mesh(double(LOW_H));title('经高温矫正后的低温图像三维显示');HAND_H=HAND-D_HIGH;subplot(325);imshow(HAND_H);title('经高温矫正后的原始手图像');subplot(326);mesh(double(HAND_H));title('经高温矫正后的原始手图像三维显示');%%%%%%%%555555555555555555
8、5555555555555555555555两点矫正%%%%%在上述程序基础之上S_L=mean2(LOW(:));%S_L为矫正点定标值S_H=mean2(HIGH(:));%S_H为矫正点定标值G_1=S_H-S_L;%数G_1G_2=HIGH-LOW;%矩阵G_2G=zeros(200,200);figure;G_3=zeros(200,