Undefined function or method 'getCameraInfo'
이전 댓글 표시
I am trying to capture a frame from webcam,for hat i used the coding below
a = imaqhwinfo;
[camera_name, camera_id, format] = getCameraInfo(a);
vid = videoinput(camera_name, camera_id, format);
% Set the properties of the video object
set(vid, 'FramesPerTrigger', Inf);
set(vid, 'ReturnedColorspace', 'rgb')
function [camera_name, camera_id, resolution] = getCameraInfo(a)
camera_name = char(a.InstalledAdaptors(end));
camera_info = imaqhwinfo(camera_name);
camera_id = camera_info.DeviceInfo.DeviceID(end);
resolution = char(camera_info.DeviceInfo.SupportedFormats(end));
i get the below error
??? Undefined function or method 'getCameraInfo' for input arguments of type
'struct'
please tell how to rectify it
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Motion Detection에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!