Logging problem of a camera with image acquisition toolbox "cannot trigger object while logging is set to on"
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi i have a camera that acquire a frame everytime it recieve a 1 on the serial port of an arduino, so an external trigger, it works fine but now it's giving me this error, the object is stuck logging a frame and it doesent save the next frames, the error doesent appear at the beginning but after half an hour randomly, sometimes it doesnt appear at all and everything works
%Select Video Source (use imaqtool to find)
vid = videoinput('winvideo',1,'RGB24_744x480');
% vid = videoinput('winvideo', 1, 'UYVY_720x480');
%This is the camera in the lab
src = getselectedsource(vid);
%Camera Settings
vid.ReturnedColorspace = 'grayscale';
vid.TriggerRepeat=inf;
src = getselectedsource(vid);
frameRates = set(src, 'FrameRate');
src.FrameRate = frameRates{3};
triggerconfig(vid, 'manual');
vid.LoggingMode = 'disk';
This is the setup of the camera, ive downgraded the framerate from 30 to 15 but the problem persist
while 1
tstart=tic;
ardtrigger(arduinoObj,startflag);
twait=toc(tstart);
if twait>=2
break
end
% start(vid);
trigger(vid);
time= toc(t0);
disp('Trigger is on!');
triggercounter=triggercounter+1;
timestamp(triggercounter)=time;
end
This instead is the while cycle that acquire frames, ardtrigger is a function that just wait for trigger reading the serial port, my trigger is 1 every 0.6second so matlab should be able to acquire a frame in that time
Edit:
Tried to change the logging mode to disk and save the video at the end from the buffer memory, but the problem still persist
댓글 수: 0
답변 (1개)
Piyush Dubey
2023년 7월 27일
Hi Fabio,
The possible reason for the error message could be that the framerate set is too fast for the camera, computer or device being used. By implementing timers and increasing the acquisition time interval it may get resolved.
Refer the following documentation that can be followed to increase the acquisition time interval:
Hope this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 GigE Vision Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!