最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

【圖像分割】基于計算機(jī)視覺實現(xiàn)醫(yī)學(xué)影像分割含GUI界面

2022-09-13 23:50 作者:Matlab工程師  | 我要投稿

1 簡介

圖像分割是圖像處理和計算機(jī)視覺中的關(guān)鍵技術(shù)之一.它有助于提高基于圖像內(nèi)容的特定目標(biāo)定位的準(zhǔn)確性,在圖像的編輯摳圖等技術(shù)中離不開正確的分割.圖像分割的方法浩如煙海,但要實現(xiàn)一個具有通用性的分割技術(shù)還面臨著很大困難.隨著計算機(jī)視覺,現(xiàn)代生理學(xué),神經(jīng)心理學(xué),物體識別,圖像處理等學(xué)科的綜合發(fā)展,基于視覺注意的圖像分割技術(shù)日益引起了人們的普遍關(guān)注.它屬于國際前沿課題,其理論成果對智能研究和發(fā)展具有重要的貢獻(xiàn).在遙感氣象服務(wù),醫(yī)學(xué)影像分析,機(jī)械制造,產(chǎn)品檢測,軍事研究,交通圖像分析等領(lǐng)域有著廣泛的應(yīng)用前景.本文基于計算機(jī)視覺實現(xiàn)醫(yī)學(xué)影像分割。

2 部分代碼

function varargout = brain_ysw(varargin)% BRAIN_YSW MATLAB code for brain_ysw.fig% ? ? ?BRAIN_YSW, by itself, creates a new BRAIN_YSW or raises the existing% ? ? ?singleton*.%% ? ? ?H = BRAIN_YSW returns the handle to a new BRAIN_YSW or the handle to% ? ? ?the existing singleton*.%% ? ? ?BRAIN_YSW('CALLBACK',hObject,eventData,handles,...) calls the local% ? ? ?function named CALLBACK in BRAIN_YSW.M with the given input arguments.%% ? ? ?BRAIN_YSW('Property','Value',...) creates a new BRAIN_YSW or raises the% ? ? ?existing singleton*. ?Starting from the left, property value pairs are% ? ? ?applied to the GUI before brain_ysw_OpeningFcn gets called. ?An% ? ? ?unrecognized property name or invalid value makes property application% ? ? ?stop. ?All inputs are passed to brain_ysw_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 brain_ysw% Last Modified by GUIDE v2.5 10-Jun-2015 13:34:14% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', ? ? ? mfilename, ... ? ? ? ? ? ? ? ? ? 'gui_Singleton', ?gui_Singleton, ... ? ? ? ? ? ? ? ? ? 'gui_OpeningFcn', @brain_ysw_OpeningFcn, ... ? ? ? ? ? ? ? ? ? 'gui_OutputFcn', ?@brain_ysw_OutputFcn, ... ? ? ? ? ? ? ? ? ? 'gui_LayoutFcn', ?[] , ... ? ? ? ? ? ? ? ? ? 'gui_Callback', ? []);if nargin && ischar(varargin{1}) ? ?gui_State.gui_Callback = str2func(varargin{1});endif 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 brain_ysw is made visible.function brain_ysw_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 brain_ysw (see VARARGIN)% Choose default command line output for brain_yswhandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes brain_ysw wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = brain_ysw_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 structurevarargout{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)warning offglobal im_org dataload('data.mat'); ? ? ? % 加載MRI圖像數(shù)據(jù),整個頭顱圖像num = str2num(get(handles.edit1,'string'));% 從13 - 31 ? (32-44取反)if num <13 || num>31 ? ?msgbox('num數(shù)字不對!num在13-31之間?。?!');endim_org = data(:,:,num); ?% 第 i 幀圖像axes(handles.axes1)imshow(im_org);title('原始圖像'); ?% 顯示原圖像% --- Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject ? ?handle to pushbutton2 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?structure with handles and user data (see GUIDATA)warning offglobal im_org data bwmax_level = double(max(data(:))); if size(im_org,3)==1 ? ?im = im_org;else ? ?im = rgb2gray(im_org);endim = permute(im,[3 2 1]); % 重置矩陣的維數(shù)for i=1:3 ? ?im = flipdim(im,i);endim(im<=40/255) = 0; ? ? ? % 剔除灰度值低的部分(腦袋和背景)im(im>=100/255) = 0; ? ? ?% 剔除灰度值高的部分(顱骨和其他的組織)im(:,:,1) = 0; ? ? ? ? ? ?% 剔除大腦灰白質(zhì)下面的部分灰度部分blk = ones([1 7 7]); ? ? ?% 塊操作% im = imerode(im,blk); ? % 腐蝕% 分離大腦腦組織lev = graythresh(double(im)/max_level) * max_level; ?% 閾值bw = (im>=lev); ? ? ? ? ? ? ? ?% 二值化bw = imrotate(squeeze(bw),90); % 變異復(fù)原axes(handles.axes2)imshow(bw);title('二值化圖像');% --- Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)% hObject ? ?handle to pushbutton3 (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)imshow(L);title('灰白質(zhì)分割圖')% --- Executes on button press in pushbutton4.function pushbutton4_Callback(hObject, eventdata, handles)% hObject ? ?handle to pushbutton4 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?structure with handles and user data (see GUIDATA)clc,clear,close allfunction edit1_Callback(hObject, eventdata, handles)% hObject ? ?handle to edit1 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit1 as text% ? ? ? ?str2double(get(hObject,'String')) returns contents of edit1 as a double% --- Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject ? ?handle to edit1 (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% ? ? ? See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) ? ?set(hObject,'BackgroundColor','white');end

3 仿真結(jié)果


4 參考文獻(xiàn)

[1]李燦飛. 計算機(jī)視覺中圖像分割技術(shù)的研究[D]. 湖南大學(xué), 2005.

博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測、信號處理、元胞自動機(jī)、圖像處理、路徑規(guī)劃、無人機(jī)等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。

部分理論引用網(wǎng)絡(luò)文獻(xiàn),若有侵權(quán)聯(lián)系博主刪除。



【圖像分割】基于計算機(jī)視覺實現(xiàn)醫(yī)學(xué)影像分割含GUI界面的評論 (共 條)

分享到微博請遵守國家法律
顺平县| 盖州市| 体育| 贺州市| 巴林右旗| 翁牛特旗| 全椒县| 华亭县| 葫芦岛市| 调兵山市| 灵丘县| 洪洞县| 静安区| 翼城县| 易门县| 龙海市| 个旧市| 夹江县| 灵台县| 庄河市| 七台河市| 中宁县| 通许县| 临高县| 佛山市| 夏河县| 西和县| 阿瓦提县| 西乌珠穆沁旗| 鄂州市| 铜山县| 蒲城县| 太仓市| 清水河县| 洮南市| 乌鲁木齐县| 南和县| 尖扎县| 石柱| 西畴县| 青铜峡市|