Why is getsnapshot on videoinput object much slower than vid.snapshot on webcam object?
15 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2019 年 5 月 13 日
編集済み: MathWorks Support Team
2023 年 12 月 24 日
When I call "getsnapshot" on a "videoinput" object, why is it much slower than calling "vid.snapshot" on a "webcam" object?
採用された回答
MathWorks Support Team
2023 年 12 月 23 日
編集済み: MathWorks Support Team
2023 年 12 月 24 日
"webcam" and "videoinput" have different design and implementation. When using "webcam" the camera starts streaming video as soon as the object is created. The "snapshot" function only grabs the latest frame from the stream. The camera will continue streaming until "webcam clear" is called.
When using "videoinput" the camera does not start streaming when the "videoinput" object is created. If the camera is not already streaming video "getsnapshot" will start it and then grab the latest frame. The timing overhead is due to the camera start taking additional time.
If you are looking for a low latency version of the "getsnapshot" function, can configure the "videoinput" in manual trigger mode and then start (or preview) the camera.
Please see this example for more information on how to accomplish this workflow:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!