Image Acquisition Toolobox : Why Stop(vid) is so slow?
1 view (last 30 days)
Show older comments
Hi Everyone,
I am currently using the Image Acquisition Toolbox to acquire data (from a camera PhotonFocus using a Matrox Interface).
In order to change acquisition parameters, I need to start and stop the videoinput quite often, but I found out that the function stop(vid) is super slow (about 5 seconds every time.)
To be more specific, here are some of the parameters I use:
vid = videoinput('matrox',1,'fichier.dcf');
set(vid, 'TriggerRepeat', Inf);
triggerconfig(vid, 'Manual';)
set(vid, 'FramesPerTrigger', 1, 'LoggingMode', 'memory');
With these parameters, start(vid) executes fastly, but stop(vid) is slow.
What does not make sense to me is that, if I set my trigger to execute a finite number of times, then the videoinput stops "naturally" when all my triggers are executed. In this case, stopping the videoinput does not seem to take any time.
So, it seems to me that the video input can fastly(less than 0.1s) stop runnning for any of the following conditions (The requested number of frames is acquired, A run-time error occurs, or The object's Timeout value is reached), but becomes slow when I use stop(vid).
Does anyone have an idea why this stop function can be so slow?
Or, is there a way to avoid the use of stop(vid)?
Unfortunetaly I can't use a finite number of triggers, since I want to acquire images untill some event(which never occurs at the same time) happens. I also can't use other functions such as preview, because I need to change the data before displaying them.
Thanks a lot,
Olivier
0 Comments
Answers (2)
Sean de Wolski
on 21 Aug 2014
Have you profiled it to see if anything else happens when the video stops? A graphics update? A file-write, etc.?
doc profile
0 Comments
See Also
Categories
Find more on Matrox Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!