第一范文网 - 专业文章范例文档资料分享平台

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

来源:用户分享 时间:2025/5/31 10:12:09 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

% -------------------------------------------------------------------- function uipanel5_SelectionChangeFcn(hObject, eventdata, handles) %í?????2¨ % hObject handle to uipanel5 (see GCBO)

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

str=get(hObject,'string'); axes(handles.axes2); switch str case '?D?μ??2¨' T=getimage;

k=medfilt2(handles.img); imshow(k); handles.img=k;

guidata(hObject,handles); case '??D???2¨' T=getimage;

h=[1 1 1;1 1 1;1 1 1]; H=h/9;

i=double(handles.img); k=convn(i,h); imshow(k,[]); handles.img=k;

guidata(hObject,handles); case '??êêó|??2¨' T=getimage;

k=wiener2(handles.img,[5,5]); imshow(k); handles.img=k;

guidata(hObject,handles); end

% -------------------------------------------------------------------- function uipanel7_SelectionChangeFcn(hObject, eventdata, handles) %?μ???-?a % hObject handle to uipanel7 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) str=get(hObject,'string');

41 / 52

axes(handles.axes2); global T switch str

case '?óóò?-?a'

T=handles.img;

f=fliplr(handles.img); imshow(f); handles.img=f;

guidata(hObject,handles); case 'é????-?a' T=handles.img;

f=flipud(handles.img); imshow(f); handles.img=f;

guidata(hObject,handles); end

% --- Executes on button press in pushbutton7.

function pushbutton7_Callback(hObject, eventdata, handles) % hObject handle to pushbutton7 (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;

h=histeq(handles.img); %?a??í???oa imshow(h); handles.img=h;

guidata(hObject,handles);

% --- Executes on button press in pushbutton8.

function pushbutton8_Callback(hObject, eventdata, handles) % hObject handle to pushbutton8 (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=imhist(handles.img); %?a??í?í3?? x1=x(1:10:256); horz=1:10:256; bar(horz,x1);

axis([0 255 0 15000]);

set(handles.axes2,'xtick',0:50:255); set(handles.axes2,'ytick',0:2000:15000);

42 / 52

% -------------------------------------------------------------------- function uipanel9_SelectionChangeFcn(hObject, eventdata, handles) % hObject handle to uipanel9 (see GCBO)

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

str=get(hObject,'string'); axes(handles.axes2); switch str case'???÷áú2??μ' T=getimage; prompt={'ê?è?2?êy:'}; defans={'2'};

p=inputdlg(prompt,'input',1,defans); p1=str2num(p{1});

f=imresize(handles.img,p1,'nearest'); imshow(f); handles.img=f;

guidata(hObject,handles);

case'????D?2??μ' T=getimage; prompt={'ê?è?2?êy:'}; defans={'1'};

p=inputdlg(prompt,'input',1,defans); p1=str2num(p{1});

f=imresize(handles.img,p1,'bilinear'); imshow(f); handles.img=f;

guidata(hObject,handles); end

% --- Executes on button press in pushbutton9.

function pushbutton9_Callback(hObject, eventdata, handles) % hObject handle to pushbutton9 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global S %?1?-1|?ü axes(handles.axes2); y=imread(S); f=imshow(y); handles.img=y;

guidata(hObject,handles);

43 / 52

% --- Executes on button press in pushbutton11.

function pushbutton11_Callback(hObject, eventdata, handles) % hObject handle to pushbutton11 (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); %3???1|?ü global T imshow(T); handles.img=T;

guidata(hObject,handles);

% -------------------------------------------------------------------- function uipanel10_SelectionChangeFcn(hObject, eventdata, handles) % hObject handle to uipanel10 (see GCBO)

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

str=get(hObject,'string'); axes(handles.axes2);

switch str case'????'

T=getimage; prompt={'ê?è?2?êy:'}; defans={'1'};

p=inputdlg(prompt,'input',1,defans); p1=str2num(p{1});

f=immultiply(handles.img,p1); imshow(f); handles.img=f;

guidata(hObject,handles); case'??è?' T=getimage; prompt={'ê?è?2?êy:'}; defans={'1'};

p=inputdlg(prompt,'input',1,defans); p1=str2num(p{1});

f=imdivide(handles.img,p1); imshow(f); handles.img=f;

guidata(hObject,handles); end

44 / 52

搜索更多关于: MATLAB课程设计--GUI图像处理 的文档
MATLAB课程设计--GUI图像处理.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c7v7ze3eja67px008u2ll_11.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top