matlab.error graphics.i​nternal.fi​gfile.FigF​ile/read>@​(hObject,e​ventdata)M​TF_Radial(​'pushbutto​n4_Callbac​k',hObject​,eventdata​,guidata(h​Object)) Error while evaluating UIControl Callback

22 Ansichten (letzte 30 Tage)
i try to do segmentation on image, but there are error like this,
Error: File: f_SegmentasiHU.m Line: 1 Column: 34
Unexpected MATLAB operator.
Error in MTF_Radial>pushbutton4_Callback (line 181)
[DB]=f_SegmentasiHU(D2); %melakukan segmentasi
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MTF_Radial (line 16)
gui_mainfcn(gui_State, varargin{:});
and the programs for error File: f_SegmentasiHU.m Line 1 Column:34
function [IC]=f_SegmentasiHU(img1.IMA);
and the program for error in MTF_Radial>pushbutton4_Callback(line 181)
function pushbutton4_Callback(hObject, eventdata, handles)
mydatacontainer=getappdata(0,'datacontainer');
D3=getappdata(mydatacontainer,'gambar');
FV=getappdata(mydatacontainer,'FV');
Miring=getappdata(mydatacontainer,'Kemiringan');
Potong=getappdata(mydatacontainer,'Perpotongan');
Spasi=getappdata(mydatacontainer,'Space');
Number=str2double(get(handles.edit1,'string'));
Citra=D3(:,:,Number);
[D2]=f_HU(Citra, Miring, Potong);
[DB]=f_SegmentasiHU(D2); %melakukan segmentasi
axes(handles.axes1);
imshow(D2,'DisplayRange',[]);
DBP = bwmorph(DB,'remove'); %mengambilbagian pinggir citra
[n m]=size(DBP);
p=0;

Akzeptierte Antwort

Geoff Hayes
Geoff Hayes am 29 Mai 2020
Nazil - the problem is with your function signature
function [IC]=f_SegmentasiHU(img1.IMA);
Note how you are defining the (only) input parameter as img1.IMA using the period '.' which is invalid given the context. Try just using
function [IC]=f_SegmentasiHU(img1)
instead (note that I've removed the semi-colon from the end of the line too - there shouldn't be any need for it).

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by