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

조회 수: 24 (최근 30일)
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;

채택된 답변

Geoff Hayes
Geoff Hayes 2020년 5월 29일
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).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by