www.pudn.com > SPIHT(Matlab).rar > func_WriteRaw.m


function func_WriteRaw(in_image,filename) 
% Matlab implementation of SPIHT (without Arithmatic coding stage) 
% 
% Read a RAW format gray scale image from disk 
% 
% input:     in_image : input image data     
%            filename : output file 
% 
% 
% 
% Jing Tian 
% Contact me : scuteejtian@hotmail.com 
% This program is part of my undergraduate project in GuangZhou, P. R. China. 
% April - July 1999 
fid = fopen(filename,'wb'); 
if (fid==1) 
   error('Cannot creat image file...press CTRL-C to exit ');pause 
end 
 
fwrite(fid,in_image', 'uchar'); 
fclose(fid);