Code covered by the BSD License  

Highlights from
Gravity Measurement Case Study

image thumbnail

Gravity Measurement Case Study

by

 

08 Jul 2003 (Updated )

Scientific imaging case study with MATLAB and toolboxes.

load_captured_data.m
% load_captured_data.m

% Copyright 2003-2010 The MathWorks, Inc.

[fileName,pathName]=uigetfile('captured*.mat','Select file');
if length(fileName)>0
  load([pathName fileName])
else
  error('User aborted program')
end
if exist('fps','var')
  if exist('t_stats','var')
    disp(sprintf('fps=%.3g, Cv=%.2g%%',fps,100*t_stats(2)/t_stats(1)))
  else
    disp(sprintf('fps=%.3g',fps))
  end
end

%play back video frames
shg, set(gcf,'doublebuffer','on'), tic
for i=1:nFrames
  while toc<t(i)-t(1), pause(0.001), end
  imshow(uint8(f(:,:,:,i)))
  title(sprintf('Frame %d, t = %.2f sec',i,t(i)))
  drawnow
end
set(gcf,'doublebuffer','off')

Contact us