close all, clear all, fclose all;

dr = dir('*.bin');
fnms = {dr.name};

ids = strrep(fnms, 'frame_', '');
ids = strrep(ids, '.bin', '');
ids = str2num(char(ids));
[~, ord] = sort(ids);

fnms = fnms(ord);

for i = 1:length(dr)
	fl = fopen(fnms{i}, 'r');
	img = fread(fl, 'int');
	img = reshape(img, 200, 200);
	spy(img),
	axis tight,
	axis square,
	axis off,
	pause(0.1)
end