raspberry pi usb camera error

13 ビュー (過去 30 日間)
chan yeoung woo
chan yeoung woo 2021 年 8 月 17 日
コメント済み: Mehdi Dehghan 2023 年 4 月 8 日
how can i solve this problem?

採用された回答

Prasanth Sunkara
Prasanth Sunkara 2021 年 8 月 18 日
Hi,
"webcam" function should be called with complete name. Similar to what you have tried in the second attempt.
Alternatively, you can also call the webcam function with numeric index. In your case, "wbcam = webcam(r,2)" would also work.
One of the reasons, why the "initialization error" comes up is due to the webcam(hw) not supporting the default resolution(320x240) that is used while creating "wbcam" object. To overcome this error, you would have to call the webcam function as "wbcam = webcam(r,2,'2592x1944')"
Referring to the manufacturer page, I think only "2592x1944" resolution is supported.
You can also use v4l2 cmd on the raspberry pi terminal to get the supported resolutions.
for example: pi@raspberrypi:~ $ v4l2-ctl --device /dev/video0 --list-formats-ext
Note: you may have to change the "/dev/vide0" with "/dev/videox" where x is the index corresponding to the specific webcam, if you have more than one(which is rare in my opinion) connected.
Thanks,
Prasanth
  1 件のコメント
Mehdi Dehghan
Mehdi Dehghan 2023 年 4 月 8 日
Thank you for your comment, your comment solved my error.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRaspberry Pi Hardware についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by