利用idl读取遥感图像
pro readclass
file='';图片的路径
data=make_array(5963,5998,type=1);图像行列数
openr,lun,file,/get_lun;读取图像
readu,lun,data
free_lun,lun;释放内存
data=congrid(data,596,599);重采样,比例关系一致
window,1,xsize=800,ysize=700
device,decomposed=0
lookup=[255,255,255,90,178,115,233,255,190,240,240,240,151,219,242,214,133,137];六种颜色rgb值
lookup=reform(lookup,3,6);将颜色变成三列六行
tvlct,lookup[0,*],lookup[1,*],lookup[2,*];重新定义新颜色
rease=0;擦除背景颜色
tv,data,50,50,order=1
colbar=rebin(indgen(1,6),40,240);六个类别
TV,colbar,650,50
loadct,0
shadowdata=bytarr(3,240)+180;底部阴影定义
TV,shadowdata,650,50
bottomshadow=bytarr(40,3)+180;定义顶部阴影
tv,bottomshadow,653,47
classname=[];
xpos=705+indgen(1,6)横坐标位置
ypos=60+indgen(6)*40
xyouts,xpos,ypos,classname,color=0,/device
end
最后显示图片如下