How to log image data acquired by imaqtool to disk with repeated triggers.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yuhan Yang
am 17 Jan. 2021
Beantwortet: Anshika Chaurasia
am 19 Jan. 2021
Here's an example code from the documentation, which waits for 100 triggers and acquires 5 frames for each trigger. I wonder how to log the image data into disk during the acquisition? I know we can get all data after the acqusition, such as data = getdata(vid,nFrames). However if the acqusition is long, it may run out of the memory, right? How to log image data into disk during the acquisition with repeated triggers?
% Create video input object.
vid = videoinput('dcam',1,'Y8_1024x768')
% Set video input object properties for this application.
vid.TriggerRepeat = 100;
vid.FramesPerTrigger = 5;
% Set value of a video source object property.
vid_src = getselectedsource(vid);
vid_src.Tag = 'motion detection setup';
% Create a figure window.
figure;
% Start acquiring frames.
start(vid)
% Calculate difference image and display it.
while(vid.FramesAvailable >= 2)
data = getdata(vid,2);
diff_im = imabsdiff(data(:,:,:,1),data(:,:,:,2));
imshow(diff_im);
drawnow % update figure window
end
stop(vid)
0 Kommentare
Akzeptierte Antwort
Anshika Chaurasia
am 19 Jan. 2021
Hi Yuhan,
You can try setting the LoggingMode property as 'disk'. Refer to LoggingMode property documentation.
Here is the example with disk logging.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Acquisition Using Image Acquisition Explorer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!