✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
在现代医学领域中,医学影像处理技术随着计算机科学和影像技术的进步,已经成为医学领域重要的一个分支.室外光照度不均,CT自身空间分辨率和层厚参数,人体组织器官蠕动等诸多外界因素造成了医学X线图像具有噪声污染,细节信息隐藏,病变组织边缘模糊等问题[1]-[3],对医生诊断和治疗的准确性构成了潜在影响. 本文以"人体肺"CT图像为研究对象,利用MATLAB GUI(Graphical UserInterface)的高度集成开发环境,对图像进行了图像增强,滤波,边缘检测,图像分割和形态学处理操作.结果证明处理后的CT图像较原图像有更好的可视度,有效地改善了图像质量,方便医务人员提取更多有价值的图像细节信息.然而直接通过Matlab软件编程实现图像处理,对于非编程专业的影像医务工作者来说这显然不是一个最佳途径.
⛄ 部分代码
function varargout = main_imagseg(varargin)
% MAIN_IMAGSEG MATLAB code for main_imagseg.fig
% MAIN_IMAGSEG, by itself, creates a new MAIN_IMAGSEG or raises the existing
% singleton*.
%
% H = MAIN_IMAGSEG returns the handle to a new MAIN_IMAGSEG or the handle to
% the existing singleton*.
%
% MAIN_IMAGSEG('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAIN_IMAGSEG.M with the given input arguments.
%
% MAIN_IMAGSEG('Property','Value',...) creates a new MAIN_IMAGSEG or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before main_imagseg_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to main_imagseg_OpeningFcn via varargin.
%
% *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 main_imagseg
% Last Modified by GUIDE v2.5 17-Mar-2019 10:45:58
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @main_imagseg_OpeningFcn, ...
'gui_OutputFcn', @main_imagseg_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before main_imagseg is made visible.
function main_imagseg_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 command line arguments to main_imagseg (see VARARGIN)
% Choose default command line output for main_imagseg
handles.output = hObject;
axes(handles.axes1)
axis off
axes(handles.axes2)
axis off
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes main_imagseg wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = main_imagseg_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 structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clc%清除command window上的命令 清屏
[filename,pathname,~]=uigetfile({'*.bmp';'*.jpg'},'All files');%选择图片文件
if~ischar(filename)%如果没有选择 则返回
return
end
[g,NR]=bwlabel(imreconstruct(SI,TI));
⛄ 运行结果
⛄ 参考文献
[1] 樊万姝. 基于半监督模糊聚类的医学图像分割系统设计[D]. 大连理工大学, 2013.
[2] 翟晓婕. 基于聚类和区域生长的彩色地图图像分割方法研究与实现[D]. 西安电子科技大学.
[3] 杜宇慧, 桂志国, 李晋华. 基于类别方差的三维医学图像分割新方法[J]. 中北大学学报:自然科学版, 2007, 28(2):5.
⛳️ 代码获取关注我
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料