Is there a way to stop preview lag during image acquisition?
3 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have this script that connects BASLER acA1440 camera and records 10 seconds of video in 60 FPS with preview on:
vid = videoinput('gentl',1,'RGB8');
src = getselectedsource(vid);
vid.ReturnedColorSpace = "rgb";
vid.LoggingMode = "disk";
vid.FramesPerTrigger = 600;
src.Gain = 5;
src.AcquisitionFrameRateEnable = "True";
vid.TriggerFrameDelay = 5;
src.AcquisitionFrameRate = 60;
src.ExposureTime = 16000; % exposure that enables 60 FPS on camera
vidWr = VideoWriter("video.mp4","MPEG-4");
vidWr.FrameRate = 60;
vid.DiskLogger = vidWr;
preview(vid)
open(vidWr);
start(vid);
wait(vid,60,"running");
close(vidWr);
stoppreview(vid);
The video file I get is good. The higher the exposure time the lag gets bigger.
Is there way to get rid of/reduce preview lag?
0 件のコメント
採用された回答
atharva
2023 年 12 月 15 日
Hey Piotr,
I understand that you want to stop preview lag during image acquisition.
You can reduce the preview lag by reducing the resolution of the preview window or by disabling the preview altogether. You can also try optimizing your code to reduce processing time.
You can also disable the preview window using the function stoppreview. You can learn more about the stoppreview function from the official mathworks documentation mentioned below-
I 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!