How to use Image Acquisition Toolbox function in Simulink?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 National Instruments Frame Grabbers 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!