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

歡迎光臨散文網 會員登陸 & 注冊

【圖像分割】基于中值濾波結合最大類間法otsu實現(xiàn)圖像分割含Matlab源碼

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

1 簡介

圖像分 割技 術在計 算機視 覺 、模 式識別 、醫(yī)學圖像處理等領 域應 用十分廣 泛 ,其主要 目的是從一 幅圖像 中提取感興趣 的目標,它是圖像分析和圖像理解的基礎。至今,提出的分割算法 已有上千種 ,其 中最經典 的方法就是基 于灰度 閾值 的分割方法 。在 圖像 閾值 化分割計 算 中 ,Otsu法… 因計算 簡單 、實時性高等優(yōu)點被廣泛使用。但是 ,一維 Otsu方法只考慮 了圖像灰度信 息 ,對噪聲較為敏 感 ,抗噪性較 弱 。為解決傳統(tǒng)二維 Otsu算法在含噪聲較多的圖像應用中分割效果較差這一問題?,本文提出一種基于中值濾波的二維 Otsu圖像分割算法 。該算法充分將中值濾波和二維Otsu算法結合起來 ,彌補 了二維 Otsu算法去噪性能的不足 。本文首先利用 自適應 加權中值濾波對噪聲圖像進行濾波處理;然后再將濾波后的中值圖像的二維直方圖區(qū)域劃分由原來 的四分法改為二分法 ,充分考慮了二維直方 圖內的每一

個像素點的信息,利用改進的二維 Otsu算法對圖像作精確分割 ,計算復雜度 降低,提高了算法的實用性。

考慮 N維 Otsu算法在含噪聲較多的圖像應用中分割效果較差這一問題 ,本文首先提出一種中值 濾波 ,然后使用該濾波對噪聲圖像進行濾波處理 。該濾波算法包括三個過程 :

a)對噪聲圖像進行噪聲檢測 ;

b)依據窗口中噪聲點的個數(shù)來確定濾波窗口的大小 ;

C)利用中值濾波對噪聲圖像進行濾波。

2 部分代碼

function varargout = experiment3(varargin)% EXPERIMENT3 MATLAB code for experiment3.fig% ? ? ?EXPERIMENT3, by itself, creates a new EXPERIMENT3 or raises the existing% ? ? ?singleton*.%% ? ? ?H = EXPERIMENT3 returns the handle to a new EXPERIMENT3 or the handle to% ? ? ?the existing singleton*.%% ? ? ?EXPERIMENT3('CALLBACK',hObject,eventData,handles,...) calls the local% ? ? ?function named CALLBACK in EXPERIMENT3.M with the given input arguments.%% ? ? ?EXPERIMENT3('Property','Value',...) creates a new EXPERIMENT3 or raises the% ? ? ?existing singleton*. ?Starting from the left, property value pairs are% ? ? ?applied to the GUI before experiment3_OpeningFcn gets called. ?An% ? ? ?unrecognized property name or invalid value makes property application% ? ? ?stop. ?All inputs are passed to experiment3_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 experiment3% Last Modified by GUIDE v2.5 31-May-2018 16:55:57% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', ? ? ? mfilename, ... ? ? ? ? ? ? ? ? ? 'gui_Singleton', ?gui_Singleton, ... ? ? ? ? ? ? ? ? ? 'gui_OpeningFcn', @experiment3_OpeningFcn, ... ? ? ? ? ? ? ? ? ? 'gui_OutputFcn', ?@experiment3_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 experiment3 is made visible.function experiment3_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 experiment3 (see VARARGIN)% Choose default command line output for experiment3handles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes experiment3 wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = experiment3_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;function 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% --- 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)shiyan3 = rgb2gray(imread('shiyan3.bmp'));size_filter_m = str2double(get(handles.edit1,'string'));size_filter_n = str2double(get(handles.edit2,'string'));if isnan(size_filter_m) ? ?size_filter_m = 3;endif isnan(size_filter_n) ? ?size_filter_n = 3;function edit2_Callback(hObject, eventdata, handles)% hObject ? ?handle to edit2 (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 edit2 as text% ? ? ? ?str2double(get(hObject,'String')) returns contents of edit2 as a double% --- Executes during object creation, after setting all properties.function edit2_CreateFcn(hObject, eventdata, handles)% hObject ? ?handle to edit2 (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 仿真結果

4 參考文獻

[1]倪麟, 龔劬, 曹莉,等. 基于自適應加權中值濾波的二維Otsu圖像分割算法[J]. 計算機應用研究, 2013, 30(2):3.

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

部分理論引用網絡文獻,若有侵權聯(lián)系博主刪除。



【圖像分割】基于中值濾波結合最大類間法otsu實現(xiàn)圖像分割含Matlab源碼的評論 (共 條)

分享到微博請遵守國家法律
陆川县| 定日县| 普陀区| 称多县| 洛浦县| 会宁县| 北海市| 宁陕县| 麻城市| 内黄县| 汕头市| 吴旗县| 湘潭县| 安陆市| 舞钢市| 胶南市| 丰城市| 河北区| 布拖县| 克山县| 勐海县| 将乐县| 萨嘎县| 慈溪市| 陇西县| 台北县| 巴东县| 太湖县| 若尔盖县| 睢宁县| 云阳县| 蛟河市| 潞西市| 诏安县| 宜州市| 吉安县| 夏河县| 贵定县| 黄大仙区| 西华县| 望都县|