Matlab - Problema con la funcion snapshot

 
Vista:

Problema con la funcion snapshot

Publicado por Jose Eduardo (1 intervención) el 03/06/2018 05:33:24
Necesito hacer que al hacer click en una interfaz se tome una foto atraves de la wecam conectada y la muestre para medir los pixeles, pero al hacer clck en el boton aparece el error "Undefined function 'snapshot' for input arguments of type 'double'."

Este es el codigo en el callback del boton:

1
2
3
4
5
6
7
8
9
10
11
12
% --- Executes on button press in checararea.
function checararea_Callback(hObject, eventdata, handles)
% hObject    handle to checararea (see GCBO)
global cam
Aro=snapshot(cam);
imshow(Aro);
%print('Aro','-dpng');
%imshow('Aro.png');
h = imdistline(gca,[100 100],[500 100]);
fcn = makeConstrainToRectFcn('imline',...
                              get(gca,'XLim'),get(gca,'YLim'));
setDragConstraintFcn(h,fcn);
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder