資源簡介
matlab to envi 把影像寫成envi標準的格式,希望對研究遙感影像處理方法的有用
代碼片段和文件信息
function?i=enviwrite(imagefname);
%?enviwrite?????????? -?write?ENVI?image?from?MATLAB?array?(V.?Guissard?Apr?29?2004)
%
%? Write?a?MATLAB?array?to?a?file?in?ENVI?standard?format
% from?a?[col?x?line?x?band]?array
%
%?SYNTAX
%
%?image=freadenvi(fname)
%?[imagep]=freadenvi(fname)
%?[imagept]=freadenvi(fname)
%
%?INPUT?:
%
%
%?image c?by?l?by?b name?of?the?MATLAB?variable?containing?the?array?to?export
% to?an?ENVI?image?with?c?=?cols?l?the?lines?and?b?the?bands
%?fname string full?pathname?of?the?ENVI?image?to?write.
%
%?OUTPUT?:
%
%?i integer i?=?-1?if?process?fail
%
%?NOTE?:?
%
%%%%%%%%%%%%%
%?Parameters?initialization
im_size=size(image);
im_size(3)=size(image3);
elements={‘samples?=‘?‘lines???=‘?‘bands???=‘?‘data?type?=‘};
d=[4?1?2?3?12?13];
%?Check?user?input
if?~ischar(fname)
????error(‘fname?should?be?a?char?string‘);
end
cl1=class(image);
if?cl1?==?‘double‘
????img=si
- 上一篇:基本粒子群算法的ieee30節點無功優化
- 下一篇:OFDM信道估計源代碼
評論
共有 條評論