Trouble with videoinput and dcam device

21 ビュー (過去 30 日間)
Luke
Luke 2015 年 1 月 4 日
コメント済み: Vijay Hiremath 2021 年 3 月 4 日
Hi all,
I'm relatively new to Matlab. I am trying to write a script that takes a live video feed from a Logitech HD Pro Webcam C920. Eventually I want to use edge detection with it rather than a recorded video, but thats not where Im having the issue. I am using Matlab R2014b.
This is my code for creating a videoinput object:
caminf = imaqhwinfo;
mycam = char(caminf.InstalledAdaptors());
mycaminfo = imaqhwinfo(mycam);
resolution = char(mycaminfo.DeviceInfo.SupportedFormats());
vid = videoinput(mycam, 1, resolution);
if I enter the command: imaqhwinfo(mycam), it says that AdaptorName: 'dcam'. However, if I run this code in a script I get the error message:
Error using videoinput (line 233)
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
Im not really sure where the problem could be here...
Thank you
  12 件のコメント
Diah Junaidi
Diah Junaidi 2019 年 5 月 31 日
Best way to solve this ---> if the usb webcam doesnt wanna install winvideo but you just have webcam, so you absolutely should choose : Image Acquisition Toolbox Support Package for "OS Generic Video Interface". This is the answer.
Vijay Hiremath
Vijay Hiremath 2021 年 3 月 4 日
Diah Junaidi : It worked as I installed the "OS Generic Video Interface" Thank you so much & U are really osm !

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

採用された回答

David Tarkowski
David Tarkowski 2015 年 1 月 6 日
You are using a Logitech camera which is a webcam. The dcam adaptor does not support webcams. If you are using the videoinput command, you should use the winvideo adaptor.
Since you are using R2014b, you can also use the webcam object. It doesn't have all of the features of videoinput, but has a simpler interface.
  3 件のコメント
KAE
KAE 2017 年 6 月 28 日
Thanks for the link, Walter. It worked for me.

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

その他の回答 (1 件)

Duy Dang
Duy Dang 2018 年 4 月 10 日
Thank you Vishwas Banjan, it work with your solution.

Community Treasure Hunt

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

Start Hunting!

Translated by