How to write correct signature for callback function which includes handles structure?
이전 댓글 표시
Hi there!
I'm getting a 'Not enough input arguments' error, when I run my GUI application. At the moment, my GUI has a button called startAcquisition:
function startAcquisition_Callback(hObject, eventdata, handles)
set(handles.video,'FramesAcquiredFcn',@display_frame);
%other stuff
end
While my function display_frame was defined as:
function display_frame(obj,event,handles)
imageData = getdata(obj,1);
%Several image processing operations are made to imageData
%One of those operations calculates the area of a ROI
%The calculated are is stored in variable areaf
area = bwarea(imageData);
areaf = num2str(area);
set(handles.edit3,'String',areaf);
end
What I want to do, is to update a text edit field with the information obtained from the calculated area of every frame.
For what I have found, it seems that there is a problem in the signature of my functions. So, any help will be appreciated.
Thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!