function u11_Callback(hObject, eventdata, handles)
% hObject handle to u11 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all
%close all
clc
global d;
[FileName,PathName] = uigetfile('*.bmp');%µ¯³ö¶Ô»°¿òµÃµ½´ò¿ªµÄ·¾¶
d=imread(strcat(PathName,FileName));%´ò¿ªµÃµ½µÄ·¾¶ÏµÄÎļþ
%d=imread('0.bmp');
figure;
imshow(d);
加阴影
function u31_Callback(hObject, eventdata, handles)
% hObject handle to u31 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%ÒõӰУÕý
global d;
global r0;
[m,n]=size(d);
global x0;
global y0;
x0=n/2;
y0=m/2;
figure;
imshow(d);
[x,y]=ginput(1);
r0 = sqrt((x-n/2)^2+(y-m/2)^2);
for i=1:m
for j=1:n
r = sqrt((i-m/2)^2+(j-n/2)^2);
if (r>=r0)
d(i,j)=0;
end
end
end
figure;
imshow(d);
function u322_Callback(hObject, eventdata, handles)
% hObject handle to u322 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%²åÖµ·¨
global d;
[M,N]=size(d);
%left