ÁÉÄþ¹¤³Ì¼¼Êõ´óѧ
¡¶Êý×ÖͼÏñ´¦Àí¡·ÉÏ»úʵϰ±¨¸æ
½Ìѧµ¥Î» ÁÉÄþ¹¤³Ì¼¼Êõ´óѧ ר Òµ ÉãÓ°²âÁ¿ÓëÒ£¸Ð ʵϰÃû³Æ Ò£¸ÐÊý×ÖͼÏñ´¦Àí °à ¼¶ ²â»æÑÐ11-3°à ѧÉúÐÕÃû ·¾Û·å ѧ ºÅ 471120212 Ö¸µ¼½Ìʦ ËﻪÉú
ʵϰ1 ¶ÁÈ¡BIP ¡¢BIL¡¢ BSQÎļþ
Ò»¡¢ÊµÑéÄ¿µÄ
ÓÃMatlab¶ÁÈ¡BIP ¡¢BIL¡¢ BSQÎļþ£¬²¢½«½á¹ûÏÔʾ³öÀ´¡£
Ò£¸ÐͼÏñ°üÀ¨¶à¸ö²¨¶Î£¬ÓжàÖÖ´æ´¢¸ñʽ£¬µ«»ù±¾µÄͨÓøñʽÓÐ3ÖÖ£¬¼´BSQ¡¢BILºÍBIP¸ñʽ¡£Í¨¹ýÕâÈýÖÖ¸ñʽ£¬Ò£¸ÐͼÏñ´¦Àíϵͳ¿ÉÒÔ¶Ô²»Í¬´«¸ÐÆ÷»ñÈ¡µÄͼÏñÊý¾Ý½øÐÐת»»¡£BSQÊÇÏñËØ°´²¨¶Î˳ÐòÒÀ´ÎÅÅÁеÄÊý¾Ý¸ñʽ¡£BIL¸ñʽÖУ¬ÏñËØÏÈÒÔÐÐΪµ¥Î»¿é£¬ÔÚÿ¸ö¿éÄÚ£¬°´ÕÕ²¨¶Î˳ÐòÅÅÁÐÏñËØ¡£BIP¸ñʽÖУ¬ÒÔÏñËØΪºËÐÄ£¬ÏñËصĸ÷¸ö²¨¶ÎÊý¾Ý±£´æÔÚÒ»Æ𣬴òÆÆÁËÏñËØ¿Õ¼äλÖõÄÁ¬ÐøÐÔ¡£
ÓÃMatlab ¶ÁÈ¡¸÷¸ö¸ñʽµÄÒ£¸ÐÊý¾Ý£¬ÊÇͼÏñ´¦ÀíµÄÇ°ÌáÌõ¼þ£¬Ö»Óн«Í¼Ïñ¶ÁÈëMatlab¹¤×÷¿Õ¼ä£¬²ÅÄܽøÐкóÐøµÄͼÏñ´¦Àí¹¤×÷¡£
¶þ¡¢Ëã·¨ÃèÊö
1.µ÷ÓÃfopenº¯ÊýÓÃÖ¸¶¨µÄ·½Ê½´ò¿ªÎļþ¡£
2.ÔÚforÑ»·Öе÷ÓÃfreadº¯Êý£¬ÓÃÖ¸¶¨µÄ¸ñʽ¶ÁÈ¡¸÷¸öÏñËØ¡£ 3.ÓÃreshapeº¯Êý£¬ÖØÖÃͼÏñµÄÐÐÊýÁÐÊý¡£
4.ÓÃimadjustº¯Êýµ÷ÕûÏñËصķ¶Î§£¬Ê¹ÆäÓÐÒ»¶¨¶Ô±È¶È¡£ 5.ÓÃimshowÏÔʾ¶ÁÈ¡µÄͼÏñ¡£
Èý¡¢MatlabÔ´´úÂë
1.¶ÁÈ¡BSQµÄÔ´´úÂ룺 clear all clc lines=400; samples=640; N=6;
img=fopen('D:\\sample_BSQ','rb'); for i=1:N
bi=fread(img,lines*samples,'uint8'); band_cov=reshape(bi,samples,lines);
band_cov2=band_cov'; band_uint8=uint8(band_cov2); tif=imadjust(band_uint8); mkdir('D:\\MATLAB','tifbands1')
name=['D:\\MATLAB\\tifbands1\\tif',int2str(i),'.tif'];
imwrite(tif,name,'tif');
tilt=['²¨¶Î',int2str(i)];
subplot(3,2,i),imshow(tif);title(tilt); end
fclose(img);
2.¶ÁÈ¡BIPÔ´´úÂë
clear all
clc lines=400; samples=640; N=6; for i=1:N
img=fopen('D:\\MATLAB\\sample_BIP','rb'); b0=fread(img,i-1,'uint8');
b=fread(img,lines*samples,'uint8',(N-1));
band_cov=reshape(b,samples,lines); band_cov2=band_cov';%¡Áa?? band_uint8=uint8(band_cov2); tif=imadjust(band_uint8); mkdir('E:\\MATLAB','tifbands')
name=['E:\\MATLAB\\tifbands\\tif',int2str(i),'.tif']; imwrite(tif,name,'tif'); %imwrite(A,filename,fmt) tilt=['²¨¶Î',int2str(i)];
subplot(3,2,i),imshow(tif);title(tilt); fclose(img); end
3.¶ÁÈ¡BILµÄÔ´´úÂë
clear all clc lines=400; samples=640; N=6; for i=1:N
bi=zeros(lines,samples); for j=1:samples
img=fopen('D:\\MATLAB\\sample_BIL','rb');
bb=fread(img,(i-1)*640,'uint8');
b0=fread(img,1*(j-1),'uint8');
bandi_linej=fread(img,lines,'uint8',1*(N*samples-1)); fclose(img);
bi(:,j)=bandi_linej; end
band_uint8=uint8(bi); tif=imadjust(band_uint8); mkdir('D:\\MATLAB','tifbands')
name=['D:\\MATLAB\\tifbands\\tif',int2str(i),'.tif']; imwrite(tif,name,'tif'); tilt=['2¡§??',int2str(i)];
subplot(3,2,i),imshow(tif);title(tilt); end