Azzera filtri
Azzera filtri

gui evaluating timerfcn problem

1 visualizzazione (ultimi 30 giorni)
tsai kai shung
tsai kai shung il 31 Ott 2017
if true
  % function frameshow_Callback(hObject, eventdata, handles)
global t  %%%%顏色辨識timer
global t1
t1=timer('TimerFcn',{@timerCallback1,handles},'ExecutionMode', 'fixedDelay','Period', 0.1);
guidata(hObject,handles);
stop(t);
start(t1);
function timerCallback1(hObject, eventdata, handles)
global vid
global t1
global frame
   if (vid==-1)
    msgbox('請首先進行預覽!');
    stop(t1);
    return;
end
axes(handles.axesshow);
frame=getsnapshot(vid);
imshow(frame);
  end
if true
  % function numberdetect_Callback(hObject, eventdata, handles)
   global t
   global t1
   t=timer('TimerFcn',{@timerCallback3,handles},'ExecutionMode', 'fixedDelay','Period', 0.1);
    guidata(hObject,handles);
   stop(t1);
    start(t);
    function timerCallback3(hObject, eventdata, handles)
    global vid
     global t
   global frame
   global c
    if (vid==-1)
  msgbox('請首先進行預覽!');
  stop(t);
  return;
end
frame=getsnapshot(vid);
imagen = rgb2gray(frame);
threshold = graythresh(imagen);
end
i want to use 2 timer to show the camera image but Interaction use
show the error:Error while evaluating TimerFcn for timer 'timer-158'

Risposte (0)

Categorie

Scopri di più su 迁移使用 GUIDE 创建的 App in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!