imaqhwinfo webcam not detected!
12 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!