Video source object does not acquire data - USB Vision
이전 댓글 표시
Hello, i have a problem where i am unable to get the video source object to acquire video frames.
Using a USB Vision 3.0 Camera from HIKROBOT
I have tried a few varieties, with a Manual Trigger and automatic trigger, but whenever i try to get the data from the camera it times out.
The reason for the timeout i assume to be that the src.Parent status is:
Acquisition Parameters: 'Stream0' is the current selected source.
10 frames per trigger using the selected source.
'Mono8' video data to be logged upon START.
Grabbing first of every 1 frame(s).
Log data to 'memory' on trigger.
Trigger Parameters: 1 'immediate' trigger(s) on START.
Status: Logging data.
0 frames acquired since starting.
0 frames available for GETDATA.
Is there something obvious i am missing?
vid = videoinput("gentl");
src = getselectedsource(vid);
commands(src);
start(vid);
data = getsnapshot(vid);
댓글 수: 3
Umar
2024년 6월 28일
편집: Walter Roberson
2024년 6월 28일
Hi Lukas,
The issue you are facing is that the code times out when trying to acquire video frames from the camera. This timeout is likely due to the camera not being triggered to capture frames properly.
To resolve the timeout issue and successfully acquire video frames, you need to ensure that the camera is triggered appropriately. You can modify the trigger settings to initiate frame capture.
vid = videoinput('gentl');
src = getselectedsource(vid);
% Configure trigger settings
triggerconfig(vid, 'manual');
src.TriggerMode = 'On'; % Set trigger mode to 'On'
src.TriggerSelector = 'FrameStart'; % Select trigger type
src.TriggerSource = 'Line0'; % Set trigger source
start(vid);
trigger(vid); % Send trigger to start capturing frames
data = getsnapshot(vid);
Hope this will help resolve your issue.
Lukas
2024년 6월 28일
Umar
2024년 6월 28일
Hi Lucas,
After reviewing your code, there is a semi colon missing after [‘memory’]; vid.LoggingMode = ['memory']
My other suggestion would be that
The line vid.LoggingMode = ['memory'] should be modified to vid.LoggingMode = 'memory'; to correctly set the logging mode to memory.
For more information regarding logging data to disk, please refer to https://www.mathworks.com/help/imaq/logging-data-to-disk.html
Hope this will help resolve your issue.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 GigE Vision Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!