imaqhwinfo webcam not detected!

7 vues (au cours des 30 derniers jours)
Sebastian Caceres
Sebastian Caceres le 2 Fév 2021
Hello,
Working on on progam for hand gesture recognition. Up until now I have been using the stock webcam of my MacBook. I have recently bought a Logitech C920 webcam and would like to use it instead of the stock one. The code used for setting up video is below.
%% Create video input object.
cam = imaqhwinfo; % Get Camera information
cameraName = char(cam.InstalledAdaptors(end));
cameraInfo = imaqhwinfo(cameraName);
cameraId = cameraInfo.DeviceInfo.DeviceID(end);
cameraFormat = char(cameraInfo.DeviceInfo.SupportedFormats(end));
vidDevice = imaq.VideoDevice(cameraName, cameraId, cameraFormat, ... % Input Video from current adapter
'ReturnedColorSpace', 'RGB');
vidInfo = imaqhwinfo(vidDevice); % Acquire video information
%I would think changing this:
cam = imaqhwinfo;
%To this, would fix the issue
cam = imaqhwinfo('macvideo',2);
%But, I recieve the following error.
%ERROR: There is no device with the specified DEVICEID.
I find this strange because I know that the computer is recognizing the c920 webcam as I can use it for Zoom. Any suggestions to be able to access c920 instead of the mac camera? Thanks!
*UPDATE: I have already installed the Image Acquisiton Toolbox support package for OS generic video interface
Best,
Sebastian Caceres

Réponses (1)

Image Analyst
Image Analyst le 2 Fév 2021
Go to the Add-ons explorer on the Home tab. Search for camera or webcam. I think there is a webcam add-on that you need to add to your installation.
  1 commentaire
Sebastian Caceres
Sebastian Caceres le 2 Fév 2021
Forgot to mention that I have already installed that add on, I'll update that in the question!

Connectez-vous pour commenter.

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by