MATLAB Answers

imaqtool does not see webcam!

100 views (last 30 days)
Abu Jawad Rafid Siddiqui
Abu Jawad Rafid Siddiqui on 2 Mar 2012
Commented: Image Analyst on 5 Mar 2020
Hi,
My usb camera works fine with amcap and also with matlab on another computer but when used on this computer, it only works with amcap. If i use 'imqreset' or restart matlab then even amcap fails to detect any camera. Although reinserting the camera in the port makes it to start to work with amcap again but it still fails to appear in imaqtool and also generates error while using 'videoinput('winvideo')'. Could it be the usb access problem? Please help me in this regard.
Best Regards, Rafid

  0 Comments

Sign in to comment.

Answers (5)

Image Analyst
Image Analyst on 2 Mar 2012
Is this a Windows system? If so, does it appear in the "Imaging Devices" category in Device Manager? I believe in videoinput you need to specify a mode which has a resolution, like RGB24_640x480 or something like that.
vid = videoinput('winvideo', 1, 'RGB24_640x480');
src = getselectedsource(vid);
vid.FramesPerTrigger = 1;

  5 Comments

Show 2 older comments
Avr Azhagan
Avr Azhagan on 20 Aug 2015
my adaptor name is 'dcam' . But my inbuilt camera is not getting recognized. Im using an inbuilt dell camera.
This is the error im getting;
>> x=videoinput('dcam',1); Error using videoinput (line 233) There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
Madhura Suresh
Madhura Suresh on 20 Aug 2015
Hi Avr Azahgan,
If you are using the inbuilt laptop webcam, its most likely to work with the 'winvideo' adaptor. What is the output of:
imaqhwinfo winvideo
This should list the camera. Then try,
vid = videoinput('winvideo','1');
The command that you are using uses the dcam adaptor. This will work if your camera supports the dcam interface, which I'm pretty sure the dell inbuilt camera won't.
Madhura

Sign in to comment.


beyza bilici
beyza bilici on 2 Dec 2017
Hello, my inbuilt camera also don't get recognized. the output of :
imaqhwinfo winvideo
Invalid ADAPTOR specified. Type 'imaqhwinfo' for a list of installed ADAPTORs. Image acquisition adaptors may be
available as downloadable support packages. Open Add-Ons Explorer to install additional adaptors.
I am using matlab 2017b, while I was using 2010 it did recognize my camera. The same codes do not work on the newest version of MATLAB

  2 Comments

Image Analyst
Image Analyst on 2 Dec 2017
Did you use the hardware explorer to install the webcam add on and the "Image Acquisition Support Package for OS Generic Video Interface" and the "MATLAB Support Package for USB Webcams"?
beyza bilici
beyza bilici on 19 Mar 2018
No I didnt at that time, after a while I noticed that and solved the problem. Thank you

Sign in to comment.


José Carlos Ferreira
José Carlos Ferreira on 8 Jun 2019
Edited: José Carlos Ferreira on 8 Jun 2019
Hello.
I have a Bison webcam that is working in my Debian 9 laptop. However, after I install usb wecam support package and Image Aquisition Toolbox, MatLab can't still "see" my webcam.
This is what command window shows:
>> imaqhwinfo linuxvideo
ans =
struct with fields:
AdaptorDllName: '/home/........./Documents/MATLAB/SupportPackages/R2016b/toolbox/imaq/supportpackages/genericvideo/…'
AdaptorDllVersion: '5.1 (R2016b)'
AdaptorName: 'linuxvideo'
DeviceIDs: {1×0 cell}
DeviceInfo: [1×0 struct]
>> webcam
No webcams have been detected. Please ensure the webcam is connected to the system.
Then I did:
>> dev_info=imaqhwinfo('linuxvideo', 1)
Error using imaqhwinfo (line 143)
There is no device with the specified DEVICEID.
I also tried:
>> vid = videoinput('linuxvideo', 1)
Error using videoinput (line 233)
There are no devices installed for the specified ADAPTORNAME. See IMAQHWINFO.
but still no way of detecting my webcam.

  1 Comment

José Carlos Ferreira
José Carlos Ferreira on 8 Jun 2019
Well, apparently Matlab can see the adapter but can't see the webcam. I tried with v4l2ucp and with cheese an the webcam is working as expected.
Can't figure out what am I doing wrong!

Sign in to comment.


Hakan Basargan
Hakan Basargan on 4 Nov 2019
Installing Image Acquisition Toolbox Support Package for OS Generic Video Interface might solve your problem :

  0 Comments

Sign in to comment.


riya mathew
riya mathew on 5 Mar 2020
I am using a usb webcam and need to take pictures on it. I installed the required support package (MATLAB Support Package for USB Webcams) But this package is not providing me with an adaptor name in order for me to take the snaps using the usb webcam. However, when I installed another support package (Image Acquisition Toolbox Support Package for OS Generic Video Interface) it took snaps from the laptop's inbuilt camera. But I need to take snaps on an externally mounted Webcam. Kindly suggest a solution

  1 Comment

Image Analyst
Image Analyst on 5 Mar 2020
If your OS sees your camera (in Windows, check Device Manager under the Imaging Devices category) then it should show up in imaqtool. Does it? Post a screenshot of imaqtool.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by