欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    医学图像预处理程序(12页).doc

    • 资源ID:35573223       资源大小:60.50KB        全文页数:12页
    • 资源格式: DOC        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    医学图像预处理程序(12页).doc

    -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 GUIDE's 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,'

    注意事项

    本文(医学图像预处理程序(12页).doc)为本站会员(1595****071)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开