How to use Image Acquisition Toolbox function in Simulink?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur National Instruments Frame Grabbers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!