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

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

【圖像檢測(cè)】基于計(jì)算機(jī)視覺實(shí)現(xiàn)米粒個(gè)數(shù)檢測(cè)含Matlab源碼

2022-05-12 13:59 作者:Matlab工程師  | 我要投稿

1 簡(jiǎn)介


2 部分代碼


function varargout = mygui(varargin)% Begin initialization code - DO NOT EDITgui_Singleton = 1;global im;gui_State = struct('gui_Name', ? ? ? mfilename, ... ? ? ? ? ? ? ? ? ? 'gui_Singleton', ?gui_Singleton, ... ? ? ? ? ? ? ? ? ? 'gui_OpeningFcn', @mygui_OpeningFcn, ... ? ? ? ? ? ? ? ? ? 'gui_OutputFcn', ?@mygui_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 mygui is made visible.function mygui_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 mygui (see VARARGIN)% Choose default command line output for myguihandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes mygui wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = mygui_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 open_pushbutton.function open_pushbutton_Callback(hObject, eventdata, handles)% hObject ? ?handle to open_pushbutton (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({'*.*';'*.bmp';'*.tif';'*.png';'*.gif';'*.jpg'},'select picture'); ?%選擇圖片路徑str = [pathname filename]; ?%合成路徑+文件名im = imread(str); ? %讀取圖片axes(handles.axes1); ?%使用第一個(gè)axesimshow(im); ?%顯示圖片title('原圖像');% --- Executes on button press in blpf_pushbutton.function blpf_pushbutton_Callback(hObject, eventdata, handles)% hObject ? ?handle to blpf_pushbutton (see GCBO)% eventdata ?reserved - to be defined in a future version of MATLAB% handles ? ?structure with handles and user data (see GUIDATA)global im;button_state = get(hObject,'Value');if button_state == get(hObject,'Max') ? ? ? ?I0 = im; ? ? ? ?% I0 = imread('beauty.jpg'); ? ? ? ? ?% subplot(2,2,1),imshow(I0);title('原圖'); ? ? ? ?str={'半徑D0大?。?#39;,'階數(shù)n:'}; ? ? ? ? ? ? ? ? ? ? ? ? ? ? %輸入相關(guān)參數(shù):高斯模板大小、方差、二值化閾值 ? ? ? ?sData=InputDlg(str,'輸入?yún)?shù)',1); ? ? ? ?if ~isempty(sData) ? ? ? ? ? ?d0=str2double(sData(1));%模板大小 ? ? ? ? ? ?n=str2double(sData(2));%次數(shù) ? ? ? ?end ? ? ? ? ? ?I1 = imnoise(I0,'gaussian'); ? ? ? ? %對(duì)原圖像加噪聲% ? ? ? ? subplot(2,2,2),imshow(I1);title('加入噪聲后圖像') ? ? ? ? %將灰度圖像的二維不連續(xù)Fourier 變換的零頻率成分移到頻譜的中心 ? ? ? ?s=fftshift(fft2(I1)); ? ? ? ?[M,N]=size(s); ? ? ? ? ? ? ? ? ? ? ?%分別返回s的行數(shù)到M中,列數(shù)到N中 ? ? ? ?n1=floor(M/2); ? ? ? ? ? ? ? ? ? ? ? %對(duì)M/2進(jìn)行取整

3 仿真結(jié)果

4 參考文獻(xiàn)

[1]洪華慶. 基于計(jì)算機(jī)視覺的米粒質(zhì)量檢測(cè)系統(tǒng)[D]. 浙江工商大學(xué).

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

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




【圖像檢測(cè)】基于計(jì)算機(jī)視覺實(shí)現(xiàn)米粒個(gè)數(shù)檢測(cè)含Matlab源碼的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
教育| 乡城县| 静宁县| 三江| 师宗县| 三门县| 隆回县| 广平县| 滨州市| 正宁县| 清丰县| 沅江市| 济阳县| 无为县| 奉贤区| 永清县| 望谟县| 新乡市| 黄山市| 张家口市| 黄平县| 罗源县| 岳普湖县| 朝阳市| 麦盖提县| 桐城市| 偏关县| 栖霞市| 东乡族自治县| 搜索| 肇州县| 梁河县| 隆昌县| 河西区| 凤山市| 甘肃省| 嘉禾县| 友谊县| 东城区| 丰镇市| 云和县|