亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? h3_gaussianblur.m

?? matlab圖像消噪程序 matlab圖像消噪程序
?? M
字號:
function varargout = h3_gaussianblur(varargin)% This GUI demonstrates Gaussian Blur, USM-Filter (Unblur/Sharpen)% and Laplace-Filter, applied on different images.%      % Please start with 'h3_gaussianblur' at command window. %% The original image is displayed on the top and the filtered image% at the bottom. Different images can be selected from the image% selection menu. Once a method is selected, the parameter% selection options change accordingly. To view the filtered image,% the "Apply" button should be pressed. For the Gaussian and the% USM-filter, sigma (i.e. the standard deviation) and the size of% mask are important, whereas for the Laplace filter, the value of% the diffusion coefficient D and the number of steps influence% blurriness and sharpness of the image. %% Description of Methods:% 1) Gaussian Blur:%    This method uses the Gaussian function to calculate the%    mask. The standard deviation (sigma) and the size of the mask%    are parameters to be changed by user. With small sigma and%    mask size, this filter tends to blur the image slightly. To%    blur the image heavily, a larger sigma and mask size should be%    applied. The following gaussian function is used to calculate%    mask: %             G = exp(-a^2/(2*sigma^2)) / (sigma*sqrt(2*pi))%%    then, the mask M of size nxn is given as:%%        M(x,y) = G(x-(n+1)/2,sigma)*G(y-(n+1)/2,sigma)%%    where:  1<=x<=n and 1<=y<=n. %%    Finally the original image matrix is convolved with this mask,%    to get the filtered image.%% 2) USM-Filter:%    This filter is the inverse of the Gaussian blur filter. It%    sharpens the gaussian blurred image with the same%    parameters. It works in the following way: %%    sharpened_image = 2*original_image-gaussian_blured_image%% 3) Laplace-Filter:%    This filter is to sharpen or blur the image. The algorithm is%    based on the mechanism of diffusion in fluids. Each color%    value of a pixel is interpreted as a concentration of%    material. The partial differential equation describing the%    diffusion process is given by %%                      du/dt = D * (laplace u)%%    The value of D is responsible for either blurring or%    sharpening the image. For positive values it sharpens and for%    negative it blurs the image. % Author : Mirza Faisal Baig% Version: 1.0% Date   : July, 27 2003%% Variable definitions within GUIDE:%% image       : PopupMenu. List of images to be selected by the user% method      : PopupMenu. Method to be selected by the user% parameters  : Different in put for different methods% vector_b    : Text box. User defined vector.% Apply       : Push Button. To Start applying filter% info        : Push Button. To display help% close       : Push Button. to close the application%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name',       mfilename, ...                   'gui_Singleton',  gui_Singleton, ...                   'gui_OpeningFcn', @h3_gaussianblur_OpeningFcn, ...                   'gui_OutputFcn',  @h3_gaussianblur_OutputFcn, ...                   'gui_LayoutFcn',  [] , ...                   'gui_Callback',   []);if nargin & isstr(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 h3_gaussianblur is made visible.function h3_gaussianblur_OpeningFcn(hObject, eventdata, handles, varargin)handles.output = hObject;% Update handles structureguidata(hObject, handles);movegui(hObject,'onscreen')% To display application onscreenmovegui(hObject,'center')  % To display application in the center of screenimage_file = get(handles.image_selection,'String');image_number = get(handles.image_selection,'Value');im_original=imread(char(image_file(image_number)));set(handles.original_image,'HandleVisibility','ON')set(handles.filtered_image,'HandleVisibility','OFF')imagesc(im_original)axis equal;axis tight;set(handles.original_image,'XTickLabel',' ','YTickLabel',' ')%----------------------------------------------------------% --- Outputs from this function are returned to the command line.function varargout = h3_gaussianblur_OutputFcn(hObject, eventdata, handles)varargout{1} = handles.output;%----------------------------------------------------------% --- Executes during object creation, after setting all properties.function image_selection_CreateFcn(hObject, eventdata, handles)if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end%----------------------------------------------------------% --- Executes on selection change in image_selection.% Popup menu for image selectionfunction image_selection_Callback(hObject, eventdata, handles)image_file = get(handles.image_selection,'String');image_number = get(handles.image_selection,'Value');im_original=imread(char(image_file(image_number)));set(handles.original_image,'HandleVisibility','ON')set(handles.filtered_image,'HandleVisibility','OFF')imagesc(im_original)axis equal;axis tight;set(handles.original_image,'XTickLabel',' ','YTickLabel',' ')colormap(gray)%----------------------------------------------------------% --- Executes during object creation, after setting all properties.function sigma_value_CreateFcn(hObject, eventdata, handles)if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end%----------------------------------------------------------function sigma_value_Callback(hObject, eventdata, handles)sigma = (get(handles.sigma_value,'Value'));set(handles.sigma_value_display,'String',num2str(sigma,2))%----------------------------------------------------------% Executes on button press in apply_button.function apply_button_Callback(hObject, eventdata, handles)image_file = get(handles.image_selection,'String');  % to read the image filename selectedimage_number = get(handles.image_selection,'Value'); % to read the number of the image selectedim_original=imread(char(image_file(image_number)));  % filenameset(handles.original_image,'HandleVisibility','ON')  % to make plot 1 visible for original image plotset(handles.filtered_image,'HandleVisibility','OFF') % to make plot 2 unvisible to the original image plot% imagesc(im_original) % to plot original imageset(handles.original_image,'XTickLabel',' ','YTickLabel',' ') % to get rid of tick labelsmethod_number = get(handles.method_selection,'Value'); % selected method% For gaussian blur and USM-Filter methodif method_number == 1 | method_number == 2,    mask_size = get(handles.mask_size,'String');       % size of the mask    mask_size_number = get(handles.mask_size,'Value'); % size of the mask    if mask_size_number == 1;        n = 2;        m = n;    elseif mask_size_number  == 2;        n = 3;        m = n;    elseif mask_size_number  == 3;        n = 4;        m = n;    elseif mask_size_number  == 4;        n = 5;        m = n;    end    sigma = get(handles.sigma_value,'Value');                     % read value of the sigma    set(handles.sigma_value_display,'String',num2str(sigma,2));     % set value of sigma for diaplay    if method_number ==1,        im_filtered = image_blur(im_original,sigma,n,m);          % filter image using image_blur function    elseif method_number == 2,         im_filtered = usm_filter(image_blur(im_original, sigma, n, m),im_original);    end% For Laplace Filterelseif method_number == 3,    D_value = get(handles.sigma_value,'Value');                   % read value of the sigma    set(handles.sigma_value_display,'String',num2str(D_value,2));   % set value of sigma for diaplay    n_steps = get(handles.mask_size,'String');                    % size of the mask    im_filtered = laplace_filter(im_original,D_value,n_steps);    % apply laplace-filterendset(handles.original_image,'HandleVisibility','OFF') % to make plot 1 unvisible to the filtered image plotset(handles.filtered_image,'HandleVisibility','ON')  % to make plot 2 visible to the filtered image plotimagesc(im_filtered) % to plot filtered imageaxis equal;axis tight;set(handles.filtered_image,'XTickLabel',' ','YTickLabel',' ') % to get rid of tick labels%----------------------------------------------------------% --- Executes on button press in info_button.function info_button_Callback(hObject, eventdata, handles)helpwin('h3_gaussianblur.m')   % Display help%----------------------------------------------------------% --- Executes on button press in close_button.function close_button_Callback(hObject, eventdata, handles)close(gcbf) % to close GUI%----------------------------------------------------------% Function to calculate filtered gaussian blur imagefunction res = image_blur(data,sigma,n,m)x = double(data);                       % convert from uint8 to doublefilter1 = i_gauss(n,sigma);             % applying i_gauss function to find filtered image%center = (n+1)/2;%res = zeros(size(data));%for k=1:n%    ki = k-center%   for l=1:n%       li = l-center%       res(center:end-center+1,center:end-center+1) = ...%           res(center:end-center+1,center:end-center+1) + ...%           x(center-ki:end-ki-center+1,center-li:end-center-li+1).*filter1(k,l);%   end%end %res = uint8(res);res = uint8(convn(x,filter1,'same'));   % convolve and convert to uint8 from double %----------------------------------------------------------% Function to calculate gaussian mask matrixfunction res = i_gauss(x_dim,sigma)% Sigma is the standard deviation of the gaussian functionn = x_dim;           % Dimensions of gaussian mask matrix i.e., nxnfor i = 1:n,    for j = 1:n        M_temp = [j-(n+1)/2 i-(n+1)/2]';               M(i,j) = gauss(M_temp(1),sigma)*gauss(M_temp(2),sigma); % mask    endendres = M/sum(sum(M)); % to normalize the mask%----------------------------------------------------------%Function to calculate Gaussian functionfunction res = gauss(x,sigma)res = exp(-x^2/(2*sigma^2))/(sigma*sqrt(2*pi));%----------------------------------------------------------% --- Executes during object creation, after setting all properties.function method_selection_CreateFcn(hObject, eventdata, handles)if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end%----------------------------------------------------------% Function to apply USM-Filterfunction res = usm_filter(im_filtered,im_original)res = uint8(2*double(im_original)-double(im_filtered));%----------------------------------------------------------% --- Executes on selection change in method_selection.% Pop up menu function for method selection and change parameter options% accordinglyfunction method_selection_Callback(hObject, eventdata, handles)method_number = get(handles.method_selection,'Value');%For Gaussian Blur and USM-Filterif method_number == 1 | method_number == 2,    check_string = get(handles.text4,'String');    if strcmp(check_string,'D Value')==1    set(handles.text4,'String','Sigma  ')    set(handles.text9,'String','Mask Size   ')    set(handles.sigma_value,'Max',5,'Min',0.1,'Value',0.1,'String','0.1')    set(handles.sigma_value_display,'Max',5,'Min',0.1,'Value',0.1,'String','0.1')    set(handles.mask_size,'Style','popupmenu','String',['2x2'; '3x3'; '4x4'; '5x5'])    end% For Laplace Filterelseif method_number == 3,    set(handles.text4,'String','D Value')    set(handles.sigma_value,'SliderStep',[0.01 0.01],'Max',0.01,'Min',-0.01,'Value',0.001)    set(handles.sigma_value_display,'Value',0.001,'Max',0.01,'Min',-0.01,'String','0.001')    set(handles.text9,'String','No. of Steps')    set(handles.mask_size,'Style','Edit','String',50,'HorizontalAlignment','Center')%,'Position',[0.556 3.056 1.056 0.189])end%----------------------------------------------------------% --- Executes during object creation, after setting all properties.function slider1_CreateFcn(hObject, eventdata, handles)usewhitebg = 1;if usewhitebg    set(hObject,'BackgroundColor',[.9 .9 .9]);else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end%----------------------------------------------------------% --- Executes on slider movement.function slider1_Callback(hObject, eventdata, handles)%----------------------------------------------------------% --- Executes during object creation, after setting all properties.function edit2_CreateFcn(hObject, eventdata, handles)if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end%----------------------------------------------------------function edit2_Callback(hObject, eventdata, handles)%----------------------------------------------------------% --- Executes during object creation, after setting all properties.function mask_size_CreateFcn(hObject, eventdata, handles)if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end%----------------------------------------------------------% --- Executes on selection change in mask_size.function mask_size_Callback(hObject, eventdata, handles)%----------------------------------------------------------function res = laplace_filter(image,D,nsteps)% This function is to sharpen or blur images. The algorithm is%    based on the mechanism of diffusion in fluids. Each color%    value of a pixel is interpreted as a concentration of%    material. The partial differential equation describing the%    diffusion process is given by%        du/dt = D * (laplace u).%%    Discretisation of this equation with finite differences gives%    the following explicit scheme:%%        u(x,y,t+dt) = (1-4*dt*D/h^2) * u(x,y,t) +%                      dt*D/h^2 [ u(x+h,y,t) + u(x-h,y,t) +%                                 u(x,y+h,t) + u(x,y-h,t) ]%% See: Huckle/Schneider, Numerik f黵 Informatiker, P. 298.%% Note: Negative values for the diffusion constant D will sharpen%       the image, positive ones will blur the image.% Author : Andreas Klimke, University of Stuttgart% Version: 0.1% Date   : May 12, 2003% Define time step size dt and step width h (normalized to 1, since% they are irrelevant for the application of image processing). dt = 1;h = 1;src = double(image);% Perform the explicit iteration process for each pixel (the pixels% at the boundary are ignored).for n = 1:nsteps	src(2:end-1,2:end-1) = (1-4*dt*D/h^2).* ...			src(2:end-1,2:end-1) + dt*D/h^2*(src(1:end-2,2:end-1) + ...		    src(3:end,2:end-1) + src(2:end-1,1:end-2) + ...			src(2:end-1,3:end));endres = (uint8(src));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区日本| 26uuu亚洲综合色| 99国产欧美久久久精品| 国产精品99久久久久久久女警 | av中文一区二区三区| 成人美女视频在线看| 成人免费视频视频| 一本到高清视频免费精品| 色婷婷亚洲婷婷| 69av一区二区三区| 日韩精品一区二区三区视频播放 | 久久久影视传媒| 欧美国产日本视频| 亚洲免费在线视频一区 二区| 一区二区三区在线观看动漫 | 国产亚洲短视频| 国产精品久久久久7777按摩| 一区二区三区四区av| 五月综合激情日本mⅴ| 久久精工是国产品牌吗| 国产精品影视在线观看| 色一区在线观看| 91精品蜜臀在线一区尤物| 久久丝袜美腿综合| 《视频一区视频二区| 日韩经典中文字幕一区| 国产精品99久久久久久久女警| av高清久久久| 欧美欧美欧美欧美| 中文字幕欧美区| 午夜精品福利在线| 国产在线一区观看| 色噜噜狠狠色综合欧洲selulu| 欧美一区二区三区公司| 国产精品久久精品日日| 日韩av一区二区三区四区| 狠狠久久亚洲欧美| 日本丶国产丶欧美色综合| 精品免费视频.| 亚洲一区二区3| 国产成人自拍高清视频在线免费播放| 美女被吸乳得到大胸91| 欧美一区二区三区免费视频| 国产白丝网站精品污在线入口| 一本一本大道香蕉久在线精品 | 一区二区视频免费在线观看| 婷婷成人激情在线网| 高清久久久久久| 日韩午夜在线观看视频| 中文字幕欧美一区| 国内精品写真在线观看| 91黄色免费看| 国产精品三级电影| 国精产品一区一区三区mba视频| 一本色道久久综合亚洲aⅴ蜜桃 | 91论坛在线播放| 精品成a人在线观看| 香蕉久久夜色精品国产使用方法| 粉嫩高潮美女一区二区三区 | 99久久国产综合精品女不卡| 欧美成人三级电影在线| 日韩精品亚洲专区| 色综合激情五月| 亚洲欧洲中文日韩久久av乱码| 国产激情视频一区二区三区欧美| 日韩欧美一区中文| 日本午夜一本久久久综合| 欧美色图天堂网| 亚洲黄色免费网站| 91在线高清观看| 亚洲女厕所小便bbb| 色综合久久久久网| 亚洲精品日韩专区silk| 色偷偷成人一区二区三区91| 中文字幕一区二区在线播放| 不卡欧美aaaaa| 亚洲色图欧美在线| 一本到高清视频免费精品| 亚洲精品菠萝久久久久久久| 欧美网站一区二区| 亚洲一区二区四区蜜桃| 欧美日韩精品一区二区三区四区| 亚洲一二三区在线观看| 9191国产精品| 国产一区欧美日韩| 中文av字幕一区| proumb性欧美在线观看| 亚洲另类一区二区| 欧美色倩网站大全免费| 日韩影视精彩在线| 久久久久久亚洲综合影院红桃| 国产一区二区三区黄视频| 中文字幕乱码一区二区免费| 91一区二区三区在线观看| 亚洲综合色在线| 日韩精品中文字幕一区二区三区 | 亚洲电影中文字幕在线观看| 欧美日韩精品一区二区三区| 久久国产精品72免费观看| 久久精品这里都是精品| 日本二三区不卡| 日本成人超碰在线观看| 亚洲国产精品国自产拍av| 日本久久精品电影| 久热成人在线视频| 亚洲欧洲精品一区二区三区| 欧美日韩免费不卡视频一区二区三区| 久久精品免费看| 一区二区三区鲁丝不卡| 日韩一级免费一区| a级精品国产片在线观看| 一区二区欧美国产| 欧美成人一区二区三区在线观看| 福利一区二区在线| 水蜜桃久久夜色精品一区的特点 | 性感美女久久精品| 久久嫩草精品久久久久| 日本久久一区二区三区| 国产91精品露脸国语对白| 亚洲电影视频在线| 亚洲国产精品av| 欧美videossexotv100| 色吊一区二区三区 | 亚洲视频小说图片| 精品电影一区二区三区| 99国产精品久久久久久久久久| 蜜芽一区二区三区| 亚洲永久免费av| 国产精品嫩草影院com| 欧美xxx久久| 欧美日产国产精品| 91福利视频网站| 成人免费毛片app| 国产一区 二区 三区一级| 天天影视色香欲综合网老头| 综合激情成人伊人| 国产精品视频第一区| 久久综合色婷婷| 日韩三级伦理片妻子的秘密按摩| 欧美性色综合网| 色综合久久久久综合99| 成人国产在线观看| 成人自拍视频在线| 国产成人aaa| 国产suv一区二区三区88区| 加勒比av一区二区| 精品亚洲porn| 韩日av一区二区| 国产一区二区三区在线观看免费| 裸体在线国模精品偷拍| 久久国产精品第一页| 久久国产成人午夜av影院| 久久99精品国产麻豆不卡| 美女mm1313爽爽久久久蜜臀| 日韩成人午夜电影| 奇米色777欧美一区二区| 蜜臀91精品一区二区三区| 捆绑调教一区二区三区| 精品一区二区三区欧美| 国产久卡久卡久卡久卡视频精品| 国内外成人在线| 夫妻av一区二区| 91啪在线观看| 欧美精品123区| 亚洲精品一线二线三线| 久久日一线二线三线suv| 久久久久久久综合色一本| 久久精品综合网| 亚洲激情图片小说视频| 亚洲福利视频一区二区| 日本欧美在线看| 国产精品一二三四区| 成人av中文字幕| 欧美三级韩国三级日本三斤| 91精品中文字幕一区二区三区| 精品成人私密视频| 亚洲色图欧美在线| 亚欧色一区w666天堂| 狠狠色狠狠色综合| 91亚洲资源网| 91精品国产综合久久香蕉麻豆| 欧美精品一区二区三区蜜臀| ...av二区三区久久精品| 日韩国产欧美视频| 成人小视频免费观看| 欧美日韩一级大片网址| 久久久久99精品国产片| 亚洲狼人国产精品| 精品一区二区在线播放| 99久久国产免费看| 精品裸体舞一区二区三区| 亚洲欧美日韩中文播放| 久久99国产精品久久99| 色婷婷狠狠综合| 久久色.com| 天堂蜜桃一区二区三区| 99re6这里只有精品视频在线观看| 91精品国产综合久久久蜜臀粉嫩| 国产精品久久午夜| 美腿丝袜亚洲色图|