Undefined function 'snapshot' for input arguments of type 'double'.
显示 更早的评论
Hi I am using webcam for my project and required snapshot of the video frame. Yet this error kept popping out "Undefined function 'snapshot' for input arguments of type 'double'."
Previously it is without this error but suddenly came out with this error and I cannot solve it.I viewed related post regarding this error by adding the path of the function that i used but still cant. Anyone please lending me a hand :)
% --- Executes on button press in Capture_image.
function Capture_image_Callback(hObject, eventdata, handles)
hMain = getappdata(0,'hMain');
cam = getappdata(hMain,'camera');
bbox = getappdata(hMain,'bbox');
videoPlayer = getappdata(hMain,'videoPlayer');
pointTracker = getappdata(hMain,'pointTracker');
faceDetector = getappdata(hMain,'faceDetector');
set(handles.axes1, 'Units', 'pixels', 'Position', [60, 180, 92, 112]);
img = snapshot(cam);
1 个评论
Walter Roberson
2017-4-21
Use the debugger to put in a conditional breakpoint after the assignment to cam, stopping if isnumeric(cam) and then run the code. When it stops, look to see what cam has become. In particular has it become the empty matrix?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Code Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!