云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > MATLAB课程设计--GUI图像处理

MATLAB课程设计--GUI图像处理

  • 62 次阅读
  • 3 次下载
  • 2025/5/7 5:21:49

% --- Executes on button press in pushbutton12.

function pushbutton12_Callback(hObject, eventdata, handles) % hObject handle to pushbutton12 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global T

axes (handles.axes2); T=getimage;

f=imcomplement(handles.img); %tí???è??′ imshow(f); handles.img=f;

guidata(hObject,handles);

% --- Executes on button press in pushbutton14.

function pushbutton14_Callback(hObject, eventdata, handles) % hObject handle to pushbutton14 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

axes(handles.axes2); y1=handles.img;

f=double(y1); % êy?Yà-Dí?a??£?MATLAB2??§3?í???μ??T??o???Díμ????? g=fft2(f); % ?μá¢ò?a??? g=fftshift(g); % ?a??êy?Y???ó [M,N]=size(g);

nn=2; % ?t???íì????1(Butterworth)μíí¨??2¨?? d0=50; %???1?μ?ê?a50 m=fix(M/2); n=fix(N/2); for i=1:M

for j=1:N

d=sqrt((i-m)^2+(j-n)^2);

h=1/(1+0.414*(d/d0)^(2*nn)); % ????μíí¨??2¨??′?μYoˉêy result(i,j)=h*g(i,j); end end

result=ifftshift(result); y2=ifft2(result); y3=uint8(real(y2));

imshow(y3); % ??ê???2¨′|àíoóμ?í???

45 / 52

% --- Executes on button press in pushbutton15.

function pushbutton15_Callback(hObject, eventdata, handles) % hObject handle to pushbutton15 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

axes(handles.axes2); x=(handles.img);

f=double(x); % êy?Yà-Dí?a?? k=fft2(f); % ?μá¢ò?a??? g=fftshift(k); % ?a??êy?Y???ó [M,N]=size(g); nn=2;

d0=25; %???1?μ?ê?a25 m=fix(M/2); n=fix(N/2); for i=1:M

for j=1:N

d=sqrt((i-m)^2+(j-n)^2); % ??????í¨??2¨??′?μYoˉêy if d<=d0 h=0; else h=1; end

result(i,j)=h*g(i,j); end end

result=ifftshift(result); y2=ifft2(result); y3=uint8(real(y2));

imshow(y3); % ??ê???2¨′|àíoóμ?í???

% --- Executes on button press in pushbutton16.

function pushbutton16_Callback(hObject, eventdata, handles) % hObject handle to pushbutton16 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global T

axes(handles.axes2); T=getimage;

f=edge(handles.img,'canny'); imshow(f); handles.img=f;

guidata(hObject,handles);

46 / 52

% -------------------------------------------------------------------- function edit_Callback(hObject, eventdata, handles) % hObject handle to edit (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% -------------------------------------------------------------------- function tuxiangbianxing_Callback(hObject, eventdata, handles) % hObject handle to tuxiangbianxing (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% -------------------------------------------------------------------- function tianjiazaosheng_Callback(hObject, eventdata, handles) % hObject handle to tianjiazaosheng (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) set(handles.uipanel4,'Visible','on'); if strcmp(get(gcbo, 'Checked'),'on')

set(handles.uipanel4,'Visible','on'); set(gcbo, 'Checked', 'off');

set(handles.uipanel4,'Visible','off'); else

set(gcbo, 'Checked', 'on'); end

% -------------------------------------------------------------------- function lvbochuli_Callback(hObject, eventdata, handles) % hObject handle to lvbochuli (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% -------------------------------------------------------------------- function changyongchuli_Callback(hObject, eventdata, handles) % hObject handle to changyongchuli (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

47 / 52

% -------------------------------------------------------------------- function teshuchuli_Callback(hObject, eventdata, handles) % hObject handle to teshuchuli (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% -------------------------------------------------------------------- function tuxiangfanzhuan_Callback(hObject, eventdata, handles) % hObject handle to tuxiangfanzhuan (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) set(handles.uipanel7,'Visible','on'); if strcmp(get(gcbo, 'Checked'),'on')

set(handles.uipanel7,'Visible','on'); set(gcbo, 'Checked', 'off');

set(handles.uipanel7,'Visible','off'); else

set(gcbo, 'Checked', 'on'); end

% -------------------------------------------------------------------- function tuxiangxuanzhuan_Callback(hObject, eventdata, handles) % hObject handle to tuxiangxuanzhuan (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) set(handles.pushbutton3,'Visible','on'); if strcmp(get(gcbo, 'Checked'),'on')

set(handles.pushbutton3,'Visible','on'); set(gcbo, 'Checked', 'off');

set(handles.pushbutton3,'Visible','off'); else

set(gcbo, 'Checked', 'on'); end

% -------------------------------------------------------------------- function ditonglvbochuli_Callback(hObject, eventdata, handles) % hObject handle to ditonglvbochuli (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) set(handles.pushbutton14,'Visible','on'); if strcmp(get(gcbo, 'Checked'),'on')

set(handles.pushbutton14,'Visible','on'); set(gcbo, 'Checked', 'off');

48 / 52

搜索更多关于: MATLAB课程设计--GUI图像处理 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

% --- Executes on button press in pushbutton12. function pushbutton12_Callback(hObject, eventdata, handles) % hObject handle to pushbutton12 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global T axes (handles.axes2); T=getimage; f=imcomplement(handles.img); %tí???è??

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com