How to use Image Acquisition Toolbox function in Simulink?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear all,
I would like to use these functions from the Image Acquisition Toolbox inside Simulink.
% PART A
src.EFLensFocusCurrent = 1000;
snapshot = getsnapshot(vidobj);
For this code to work, we need the following initialization
% PART B
vidobj = videoinput('gentl',1,'Mono8');
src = getselectedsource(videobj);
Besides, when the simulation ends, I have to add
% PART C
stop(vidobj); clear vidobj src;
The Part B is time consumming and it is not possible to execute it for every image.
To summarise, I already wrote the code in Matlab and it works. I need to translate it into simulink.
vidobj = videoinput('gentl',1,'Mono8');
src = getselectedsource(videobj);
for i=1:10
snapshot = getsnapshot(vidobj);
src.EFLensFocusCurrent = 100*i;
% some processing with the snapshot
end
stop(vidobj); clear vidobj src;
Thank you very much for your help,
Best regards,
Antoine
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu National Instruments Frame Grabbers 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!