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

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

【邊緣檢測】基于sobel、prewit、canny算法實(shí)現(xiàn)圖像邊緣檢測含Matlab源碼

2022-05-10 04:43 作者:Matlab工程師  | 我要投稿

1 簡介

圖像邊緣是圖像的最基本的特征.所謂邊緣,就是指圖像局部強(qiáng)度變化最明顯的部分,存在于區(qū)域與區(qū)域,目標(biāo)與目標(biāo),目標(biāo)與背景,基元與基元之間,包含有圖像處理中用于識(shí)別的關(guān)鍵信息.邊緣檢測是數(shù)字圖像處理中,最基礎(chǔ)也是最重要的環(huán)節(jié)之一. 本文介紹了3種經(jīng)典的邊緣檢測算子,包括Sobel算子,Canny算子,Prewitt算子檢測方法.并且利用MATLAB系統(tǒng)所提供的相關(guān)函數(shù)等,對(duì)同一副圖像結(jié)合用這些不同的算子分別進(jìn)行處理,分析并得到他們處理圖像的特點(diǎn).?

2 部分代碼


function varargout = guipic(varargin)% GUIPIC MATLAB code for guipic.fig% ? ? ?GUIPIC, by itself, creates a new GUIPIC or raises the existing% ? ? ?singleton*.%% ? ? ?H = GUIPIC returns the handle to a new GUIPIC or the handle to% ? ? ?the existing singleton*.%% ? ? ?GUIPIC('CALLBACK',hObject,eventData,handles,...) calls the local% ? ? ?function named CALLBACK in GUIPIC.M with the given input arguments.%% ? ? ?GUIPIC('Property','Value',...) creates a new GUIPIC or raises the% ? ? ?existing singleton*. ?Starting from the left, property value pairs are% ? ? ?applied to the GUI before guipic_OpeningFcn gets called. ?An% ? ? ?unrecognized property name or invalid value makes property application% ? ? ?stop. ?All inputs are passed to guipic_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 guipic% Last Modified by GUIDE v2.5 13-Mar-2021 17:27:58% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', ? ? ? mfilename, ... ? ? ? ? ? ? ? ? ? 'gui_Singleton', ?gui_Singleton, ... ? ? ? ? ? ? ? ? ? 'gui_OpeningFcn', @guipic_OpeningFcn, ... ? ? ? ? ? ? ? ? ? 'gui_OutputFcn', ?@guipic_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 guipic is made visible.function guipic_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 guipic (see VARARGIN)% Choose default command line output for guipichandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes guipic wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = guipic_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 ok.function ok_Callback(hObject, eventdata, handles)% hObject ? ?handle to ok (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?structure with handles and user data (see GUIDATA)global im%選擇圖片路徑[filename,pathname]=... ? ?uigetfile({'*.jpg';'*.bmp';'*.gif'},'選擇圖片');%合成路徑加文件名str=[pathname filename];%讀取圖片im=imread(str);%使用第一個(gè)AXESaxes(handles.axes1);%顯示圖片imshow(im);% --- 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)close(gcf)

3 仿真結(jié)果



4 參考文獻(xiàn)

[1]吳曦. 基于MATLAB的圖像邊緣檢測算法的研究和實(shí)現(xiàn)[D]. 吉林大學(xué).

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

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




【邊緣檢測】基于sobel、prewit、canny算法實(shí)現(xiàn)圖像邊緣檢測含Matlab源碼的評(píng)論 (共 條)

分享到微博請遵守國家法律
固阳县| 玉环县| 麻江县| 新巴尔虎右旗| 雷波县| 拉萨市| 安塞县| 岚皋县| 称多县| 嵩明县| 始兴县| 中宁县| 永善县| 资兴市| 湖口县| 赞皇县| 呼图壁县| 赫章县| 镇沅| 当涂县| 光山县| 厦门市| 海门市| 庆元县| 祁东县| 东台市| 五河县| 仙桃市| 平顺县| 永州市| 青川县| 白城市| 小金县| 台安县| 景泰县| 金溪县| 溧水县| 通化市| 沂水县| 延安市| 安顺市|