SCILAB中GUI中未定义变量的错误

时间:2015-03-29 18:57:51

标签: scilab

我在scilab中制作GUI,我的代码是: -

///first push button
function file_open_callback(handles)
//Write your callback for  file_open  here
Image = imread(path);
//handles.Image=Image;
figure();ShowColorImage(Image,'mixer');//show image
I1G=rgb2gray(Image);
ShowImage(I1G,'mixer');
handles.I1G=I1G;
//handles= getcallbackobject(f.figure_id);
endfunction

///second push button
function select_ROI1_callback(handles)
//Write your callback for  select_ROI1  here
rect1 = rubberbox();xrect(rect1);///disp(rect1);
handles.rect1=rect1;
endfunction

///Third pushbutton
function Reverse_Yaxis_callback(handles)
//Write your callback for  Reverse_Yaxis  here
//handles.I1G=findobj('Tag','file_open');
//I1G=handles.I1G;
imheight=size(handles.I1G,'r');//image height
rect1(2)=imheight-rect1(2);//reverse y axis coordinate
endfunction

它显示以下错误:

  

! - 错误4未定义变量:I1G在功能的第3行   Reverse_Yaxis_callback被调用:%oldgcbo = gcbo;结束; gcbo =   getcallbackobject(312); Reverse_Yaxis_callback(手柄);如果   存在(“%oldgcbo”)然后gcbo =%oldgcbo;否则明确gcbo;结束了   执行回调

我该如何解决这个问题?

0 个答案:

没有答案