How to use Image Acquisition Toolbox function in Simulink?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre National Instruments Frame Grabbers en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!