显示
G3.vardisp= uicontrol('Style','edit',...
'Position', [520 280 30 30],...
'String','0');
滑块
G3.slide = uicontrol('style','slide',...
'unit','pix',...
'position',[400 280 120 30],...
'min',-10,'max',10,'val',1,...
'sliderstep',[1/20 1/10],...
'callback',{@sl_call3,G3});
Slider的回调
function [] = sl_call3(varargin)
[l,G3] = varargin{[1,3]}; % calling handle and data structure.
set(G3.vardisp,'String',get(l,'value'))
vbrilho=get(l,'value')
subplot('Position',[.35, 0.575, 0.375, 0.375])
x4.head_mod=(vcontraste*x4.head)+(vbrilho*10);
imshow(x4.head_mod)
end
按钮
filtro.medfiltbtn1 = uicontrol('Parent',hsp,...
'Style', 'pushbutton',...
'String', 'medfilt2_1',...
'Position',[0 35 80 30],...
'callback',{@teste,1});
按钮回调
function []= teste(varargin)
[t1] = varargin{[3]};
while t1==1
subplot('Position',[.35, 0.575, 0.375, 0.375])
x4.head_modf=imnoise(x4.head_mod,'gaussian',0,0.01);
t1=0;
imshow(x4.head_modf)
end
运行代码时,imnoise
可以应用于x4.head_mod
,但我无法在(vcontraste*x4.head)+(vbrilho*10)
上应用等式imnoise
。我想以某种方式嵌套两个结果。