CloseRequestFcn not working with webcam playing

1 view (last 30 days)
function ActivarCamara_Callback(hObject,~, handles)
SeleccionWebcam;
Data = get(0,'UserData');
vid = webcam(Data.cam);
vid.Resolution = '640x480';
handles.vid = vid;
imHeight=str2num(vid.Resolution(5:7));imWidth=str2num(vid.Resolution(1:3));nBands=3;
% Crea una Variable q contenga la Imagen para mostarla en el AXES(handles.Webcam)
hImage = image(zeros(imHeight,imWidth,nBands),'parent',handles.Webcam);
% Vista previa de Webcam
preview(vid,hImage);
guidata(hObject,handles);
function figure1_CloseRequestFcn(hObject,~,handles)
delete(handles.figure1);
function FinCalibracion_Callback(hObject, ~, handles)
set(0,'UserData',handles.Datos);
Salida=get(0,'UserData');Entrada=Salida;IRISCURSOR(Entrada);
guidata(hObject,handles);
% Cierro la ventana
delete(handles.Calibracion)
Al presionar la cruz para el cierre de la interfaz mediante la función CloseRequestFcn y la webcam reproduciendose, se tilda la imagen de video y no cierra, ni ingresa a dicha función. Probé cerrar antes la webcam y tampoco funciona. Lo extraño es que si lo cierro por un botón extra de finalización si cierra todos.
¿Alguna idea de como salvar este problema?

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!