imaqhwinfo webcam not detected!

7 ビュー (過去 30 日間)
Sebastian Caceres
Sebastian Caceres 2021 年 2 月 2 日
編集済み: Sebastian Caceres 2021 年 2 月 2 日
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

回答 (1 件)

Image Analyst
Image Analyst 2021 年 2 月 2 日
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 件のコメント
Sebastian Caceres
Sebastian Caceres 2021 年 2 月 2 日
Forgot to mention that I have already installed that add on, I'll update that in the question!

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by