next up previous contents
Next: Reading a velocity field Up: Matlab programmes for image Previous: Matlab programmes for image   Contents


Reading a raw image:

%Reading of an image in 16 bits with nx*ny pixels:

function [U]=readimage(nx,ny,path);

fid=fopen(path,'r');

B=fread(fid,Inf,'int16',0,'ieee-le');

U=reshape(B,Nx,ny);

fclose(fid);

figure(1); %display

imagesc(U');

end;



Joel Sommeria 2003-02-14