-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTestWrapper.m
More file actions
37 lines (30 loc) · 1008 Bytes
/
TestWrapper.m
File metadata and controls
37 lines (30 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cd('C:\Users\shayo\Dropbox (MIT)\Code\Xray Multiple View\RadEye4Matlab');
h=RadEyeWrapper('Init')
if h ~= 1
fprintf('Error initializing camera\n');
return;
end
% Single image grabbing
exposureTimeMS = 990;
overheadMS = 300; % might be faster on fast computers...
RadEyeWrapper('GrabSingleFrame',exposureTimeMS); % non-blocking
tic, while toc < (exposureTimeMS+overheadMS)/1000, end
RadEyeWrapper('GetBufferSize') % should return 1
I=RadEyeWrapper('GetImageBuffer');
% Continuous acqusition
% Note that exposure time is actually fixed
fps = 2.5;
RadEyeWrapper('StartContinuous', fps);
for k=1:10
fprintf('%s Last Image Timestamp: %d, Num Images In Buffer: %d\n',datestr(now),RadEyeWrapper('getNumTrigs'),RadEyeWrapper('GetBufferSize'));
tic, while toc < 0.5, end
end
RadEyeWrapper('StopContinuous');
I=RadEyeWrapper('GetImageBuffer');
figure(11);
clf;
imagesc(mean(I,3))
%% For triggering the x-ray
% Option 2)
% Ramp X-ray voltage and current
% Call RadEyeWrapper('StartContinuous');