




免费预览已结束,剩余7页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
-function varargout = tuxiangyuchuli(varargin)%TUXIANGYUCHULI M-file for tuxiangyuchuli.fig% TUXIANGYUCHULI, by itself, creates a new TUXIANGYUCHULI or raises the existing% singleton*.% H = TUXIANGYUCHULI returns the handle to a new TUXIANGYUCHULI or the handle to% the existing singleton*.% TUXIANGYUCHULI(Property,Value,.) creates a new TUXIANGYUCHULI using the% given property value pairs. Unrecognized properties are passed via% varargin to tuxiangyuchuli_OpeningFcn. This calling syntax produces a% warning when there is an existing singleton*.% TUXIANGYUCHULI(CALLBACK) and TUXIANGYUCHULI(CALLBACK,hObject,.) call the% local function named CALLBACK in TUXIANGYUCHULI.M with the given input% arguments.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help tuxiangyuchuli % Last Modified by GUIDE v2.5 07-Sep-2014 18:05:07 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, tuxiangyuchuli_OpeningFcn, . gui_OutputFcn, tuxiangyuchuli_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT % - Executes just before tuxiangyuchuli is made visible.function tuxiangyuchuli_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin unrecognized PropertyName/PropertyValue pairs from the% command line (see VARARGIN) % Choose default command line output for tuxiangyuchulihandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes tuxiangyuchuli wait for user response (see UIRESUME)% uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = tuxiangyuchuli_OutputFcn(hObject, eventdata, handles)% varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structurevarargout1 = handles.output; % - Executes during object creation, after setting all properties.function axes1_CreateFcn(hObject, eventdata, handles)% hObject handle to axes1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: place code in OpeningFcn to populate axes1 % - Executes on mouse press over axes background.function axes1_ButtonDownFcn(hObject, eventdata, handles)% hObject handle to axes1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % - Executes on mouse press over axes background.function axes5_ButtonDownFcn(hObject, eventdata, handles)% hObject handle to axes5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_1_Callback(hObject, eventdata, handles)% hObject handle to Untitled_1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_2_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_3_Callback(hObject, eventdata, handles)% hObject handle to Untitled_3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -%显示灰度图像function Untitled_4_Callback(hObject, eventdata, handles)% hObject handle to Untitled_4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)handles.img=getimage(handles.axes1);axes(handles.axes2);if isrgb(handles.img);y=rgb2gray(handles.img);imshow(y);else handles.img=getimage(handles.axes1); axes(handles.axes2); imshow(handles.img);end % -%显示直方图function Untitled_31_Callback(hObject, eventdata, handles)% hObject handle to Untitled_31 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)handles.img=getimage(handles.axes2);axes(handles.axes3);imhist(handles.img); % -function Untitled_32_Callback(hObject, eventdata, handles)% hObject handle to Untitled_32 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_21_Callback(hObject, eventdata, handles)% hObject handle to Untitled_21 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_22_Callback(hObject, eventdata, handles)% hObject handle to Untitled_21 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_23_Callback(hObject, eventdata, handles)% hObject handle to Untitled_22 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -%打开文件function Untitled_11_Callback(hObject, eventdata, handles)% hObject handle to Untitled_11 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)%选取图片路径filename,pathname=uigetfile(*.*,选取图片);%合成路径+文件名str=pathname filename; %读取图片im=imread(str); %使用第一个axesaxes(handles.axes1); %显示图片imshow(im) % -function Untitled_12_Callback(hObject, eventdata, handles)% hObject handle to Untitled_12 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -%关闭程序function Untitled_13_Callback(hObject, eventdata, handles)% hObject handle to Untitled_13 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)clc;close all;close(gcf); % -function Untitled_231_Callback(hObject, eventdata, handles)% hObject handle to Untitled_211 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_232_Callback(hObject, eventdata, handles)% hObject handle to Untitled_212 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_221_Callback(hObject, eventdata, handles)% hObject handle to Untitled_211 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -function Untitled_222_Callback(hObject, eventdata, handles)% hObject handle to Untitled_212 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % -%上下翻转function Untitled_211_Callback(hObject, eventdata, handles)% hObject handle to Untitled_211 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)x=getimage(handles.axes1);axes(handles.axes4);if isrgb(x) for k=1:3 y(:,:,k)=flipud(x(:,:,k);%上下翻转函数endimshow(y);else y=flipud(x); imshow(y);end% -%左右翻转function Untitled_212_Callback(hObject, eventdata, handles)% hObject handle to Untitled_212 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)x=getimage(handles.axes1);axes(handles.axes4);if isrgb(x) for k=1:3 y(:,:,k)=fliplr(x(:,:,k);%左右翻转函数endimshow(y);else y=flipud(x); imshow(y);end % -%任意角度旋转function Untitled_213_Callback(hObject, eventdata, handles)% hObject handle to Untitled_213 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes1);axes(handles.axes4);prompt=输入参数1:;defans=30;p=inputdlg(prompt,输入参数,1,defans);p1=str2num(p1);y=imrotate(a,p1); imshow(y);% -%显示处理前图像频谱function Untitled_321_Callback(hObject, eventdata, handles)% hObject handle to Untitled_321 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)x=getimage(handles.axes2);axes(handles.axes5);if isrgb(x) m=fft2(x(:,:,1); y=fftshift(m); imshow(log(abs(y),);else m=fft2(x); y=fftshift(m); imshow(log(abs(y),);end % -%显示处理后图像频谱function Untitled_322_Callback(hObject, eventdata, handles)% hObject handle to Untitled_322 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes4);axes(handles.axes6);if isrgb(a);x=rgb2gray(a);else x=getimage(handles.axes4); axes(handles.axes6);endif isrgb(x) m=fft2(x(:,:,1); y=fftshift(m); imshow(log(abs(y),);else m=fft2(x); y=fftshift(m); imshow(log(abs(y),);end % -%邻近的两点插值缩小function Untitled_2221_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2221 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes1);axes(handles.axes4);%邻近插值放大prompt=输入放大倍数:;defans=0.2;p=inputdlg(prompt,输入放大倍数,1,defans);p1=str2num(p1);y=imresize(a,p1,nearest); %邻近的两点插值缩小imshow(y); % -%线性插值缩小function Untitled_2222_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2222 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes1);axes(handles.axes4);%邻近插值放大prompt=输入放大倍数:;defans=0.2;p=inputdlg(prompt,输入放大倍数,1,defans);p1=str2num(p1);y=imresize(a,p1,bilinear); %线性插值缩小imshow(y); % -%三次样条插值缩小function Untitled_2223_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2223 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes1);axes(handles.axes4);%邻近插值放大prompt=输入放大倍数:;defans=0.2;p=inputdlg(prompt,输入放大倍数,1,defans);p1=str2num(p1);y=imresize(a,p1,bicubic); %三次样条插值放大imshow(y); % -%邻近的两点插值放大function Untitled_2211_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2211 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes1);axes(handles.axes4);%邻近插值放大prompt=输入放大倍数:;defans=2;p=inputdlg(prompt,输入放大倍数,1,defans);p1=str2num(p1);y=imresize(a,p1,nearest); %最近邻插值法放大imshow(y);% -%线性插值放大function Untitled_2212_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2212 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes1);axes(handles.axes4);%邻近插值放大prompt=输入放大倍数:;defans=2;p=inputdlg(prompt,输入放大倍数,1,defans);p1=str2num(p1);y=imresize(a,p1,bilinear); %线性插值放大imshow(y); % -%三次样条插值放大function Untitled_2213_Callback(hObject, eventdata, handles)% hObject handle to Untitled_2213 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)a=getimage(handles.axes1);axes(handles.axes4);%邻近插值放大prompt=输入放大倍数:;defans=2;p=inputdlg(prompt,输入放大倍数,1,defans);p1=str2num(p1);y=imresize(a,p1,bicubic); %三次样条插值放大imshow(y); % -%保存灰度图像function Untitled_121_Callback(hObject, eventdata, handles)% hObject handle to Untitled_121 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)f,p=uiputfile(*.jpg,保存文件);str=strcat(p,f);pix=getframe(handles.axes2);im
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 账户知识培训简报课件
- 象棋的课件教学课件
- 2025版天花吊顶工程智能化设计与施工合同
- 2025年度水电工程绿色施工与节能减排承包合同样本
- 2025版啤酒行业风险管理与保险合同
- 2025版全新智能电网建设项目施工合同编号下载
- 2025版石材长途运输合同及风险防控协议
- 2025版汽车用品试用销售与售后服务合同
- 2025年度东昌府区交通运输局交通设施租赁合同
- 2025版洗煤厂租赁合同及设备更新改造责任书
- 2025四川省公安厅警务辅助人员招聘(448人)笔试备考试题及答案解析
- 基础护理学题库及答案
- 《遵守校纪班规》课件
- 走进焊接 课件 2.1百花齐放推陈出新-焊接方法
- 北京市律师协会律师办理法律尽职调查业务操作指引
- (2025年标准)会员销售协议书
- 2025至2030中国专业图片存档和通信系统(PACS)行业项目调研及市场前景预测评估报告
- 难治性痛风中西医结合诊疗专家共识解读 4
- 献县地热管理办法
- 教育测量与评价 课件全套 朱德全 第1-15章 教育测量与评价概述- 教育测评结果的统计处理
- 财务共享模式下中储粮财务集中管理研究
评论
0/150
提交评论