How can a video input object be used to acquire images as rapidly as the preview function
조회 수: 3 (최근 30일)
이전 댓글 표시
I am using an allied vision GigE GT4905 with the GenTL transport layer. The sensor is configured to Mono14 and full frame (3264x4896). When using the preview function in the Image Acquisition Tool, images are displayed at approximately 3.5fps. However, using the getsnapshot function at the command line only returns images at 0.6fps. How can I acquire images from the videoinput object at the command line as rapidly as the preview function does in the Image Acquisition Tool?
댓글 수: 0
답변 (1개)
Urmila Rajpurohith
2021년 2월 23일
Hi
Try using "VideoReader" for reading and previewing pre recorded mp4 file. I am attaching a snippet from the documentation that does the same.
v = VideoReader('xylophone.mp4');
currAxes = axes;
while hasFrame(v)
vidFrame = readFrame(v);
image(vidFrame, 'Parent', currAxes);
currAxes.Visible = 'off';
pause(1/v.FrameRate);
end
Refer to the below documentation page for more information on "videoReader":
댓글 수: 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!