How to write correct signature for callback function which includes handles structure?
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!