-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbfwFcn.m
42 lines (29 loc) · 872 Bytes
/
bfwFcn.m
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
38
39
40
function bfwFcn(src,evnt)
global BFW
if isempty(BFW)
BFW = vision.BinaryFileWriter
BFW.Filename = fullfile('F:\Data\BFW\test1','test1.bin')
BFW.VideoFormat = 'Custom'
BFW.BitstreamFormat = 'planar';
BFW.VideoComponentCount = 1;
BFW.VideoComponentBits = 16
BFW.VideoComponentBitsSource = 'property'
end
%make directory
BFW.step(getdata(src));
% JAVA ALTERNATIVE WITH PREALLOCATION
% fh = javaObject('java.io.RandomAccessFile', fpath, 'rw');
% fh.setLength(1024*1024*4*N)
% writeShort(fh,uint16(59))
% fh.close
% fh = javaObject('java.io.File', fpath);
% fsh = javaObject('java.io.FileOutputStream',fh)
% dsh = javaObject('java.io.DataOutputStream', fsh)
% feature getpid
% abstime = event.Data.AbsTime;
% AbsTime: [2004 12 29 16 40 52.5990]
% FrameMemoryLimit: 139427840
% FrameMemoryUsed: 0
% FrameNumber: 0
% RelativeFrame: 0
% TriggerIndex: 1