【图像去噪】基于GUI小波、中值、维纳及频域上的滤波【Matlab 457期】

一、简介

基于matlab GUI小波、中值、维纳及频域上的滤波

二、源代码

function varargout = dsp1_2(varargin)
% DSP1_2 MATLAB code for dsp1_2.fig
%      DSP1_2, by itself, creates a new DSP1_2 or raises the existing
%      singleton*.
%
%      H = DSP1_2 returns the handle to a new DSP1_2 or the handle to
%      the existing singleton*.
%
%      DSP1_2('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in DSP1_2.M with the given input arguments.
%
%      DSP1_2('Property','Value',...) creates a new DSP1_2 or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before dsp1_2_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to dsp1_2_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 dsp1_2

% Last Modified by GUIDE v2.5 27-Mar-2014 13:11:02

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @dsp1_2_OpeningFcn, ...
                   'gui_OutputFcn',  @dsp1_2_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{
    
    1})
    gui_State.gui_Callback = str2func(varargin{
    
    1});
end

if 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 dsp1_2 is made visible.
function dsp1_2_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 dsp1_2 (see VARARGIN)


h_figure1=findobj('Tag','figure1');%获取figure1的句柄,实现界面间的信息传递
h_figure1=guihandles(h_figure1);%类似编程语言中的向上转型,得到handles结构
setappdata(handles.figure2,'h_figure1',h_figure1);
% Choose default command line output for dsp1_2
axes(handles.axes4);
%h_figure1=getappdata(handles.figure2,'h_figure1');

img3=getappdata(h_figure1.figure1,'img3');
img1=getappdata(h_figure1.figure1,'img1');
setappdata(handles.figure2, 'img1', img1);
setappdata(handles.figure2, 'img4_prime', img3);
setappdata(handles.figure2, 'img4', img3);
setappdata(handles.figure2, 'img5', 0);%压缩后图像
setappdata(handles.figure2, 'cr', 0);%压缩比
%img4_prime = getappdata(handles.figure2, 'img4_prime');
imshow(img3);
set(handles.menuitem_save, 'Enable', 'off');

handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes dsp1_2 wait for user response (see UIRESUME)
% uiwait(handles.figure2);


% --- Outputs from this function are returned to the command line.
function varargout = dsp1_2_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 structure
varargout{
    
    1} = handles.output;


% --- Executes on selection change in popupmenu4.
function popupmenu4_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu4 contents as cell array
%        contents{
    
    get(hObject,'Value')} returns selected item from popupmenu4


% --- Executes during object creation, after setting all properties.
function popupmenu4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to popupmenu4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu 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 selection change in popupmenu_yasuo.
function popupmenu_yasuo_Callback(hObject, eventdata, handles)
% hObject    handle to popupmenu_yasuo (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu_yasuo contents as cell array
%        contents{
    
    get(hObject,'Value')} returns selected item from popupmenu_yasuo
val = get(hObject,'Value');
str = get(hObject, 'String');
switch str{
    
    val};
    case 'PCA' % 选项框的隐藏与再现
      set(handles.uipanel_cheng, 'Visible', 'off');
      set(handles.uipanel_jpeg, 'Visible', 'off');
      set(handles.uipanel_cheng2, 'Visible', 'off');
      set(handles.uipanel_yasuobi, 'Visible', 'on');
      set(handles.pushbutton_yasuo, 'Enable', 'on');

    case 'Transform(DCT)' % 
       set(handles.uipanel_cheng, 'Visible', 'off');
       set(handles.uipanel_jpeg, 'Visible', 'off');
       set(handles.uipanel_cheng2, 'Visible', 'off');
       set(handles.uipanel_yasuobi, 'Visible', 'on');
       set(handles.pushbutton_yasuo, 'Enable', 'on');
       img4 = getappdata(handles.figure2, 'img1');
       axes(handles.axes4)
       %img4 = im2double(img4);
       imshow(img4, []);

    case 'Transform(FFT)' % 
        set(handles.uipanel_cheng, 'Visible', 'off');
        set(handles.uipanel_jpeg, 'Visible', 'off');
        set(handles.uipanel_cheng2, 'Visible', 'off');
        set(handles.uipanel_yasuobi, 'Visible', 'on');
        set(handles.pushbutton_yasuo, 'Enable', 'on');
        img4 = getappdata(handles.figure2, 'img1');
        axes(handles.axes4)
        %img4 = im2double(img4);
        imshow(img4, []);

    case '位平面行程编码(无损)'
        set(handles.uipanel_yasuobi, 'Visible', 'off');
        set(handles.uipanel_jpeg, 'Visible', 'off');
        set(handles.uipanel_cheng2, 'Visible', 'off');
        set(handles.uipanel_cheng, 'Visible', 'on');
        set(handles.pushbutton_yasuo, 'Enable', 'on');
        
    case '位平面行程编码(有损)'
      set(handles.uipanel_yasuobi, 'Visible', 'off');
      set(handles.uipanel_jpeg, 'Visible', 'off');
      set(handles.uipanel_cheng, 'Visible', 'off');
      set(handles.uipanel_cheng2, 'Visible', 'on');
      set(handles.pushbutton_yasuo, 'Enable', 'on');
      
    case 'JPEG'
        set(handles.uipanel_yasuobi, 'Visible', 'off');
        set(handles.uipanel_cheng, 'Visible', 'off');
        set(handles.uipanel_cheng2, 'Visible', 'off');
        set(handles.uipanel_jpeg, 'Visible', 'on');
        set(handles.pushbutton_yasuo, 'Enable', 'on');

end


% --- Executes during object creation, after setting all properties.
function popupmenu_yasuo_CreateFcn(hObject, eventdata, handles)
% hObject    handle to popupmenu_yasuo (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu 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



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 pushbutton_yasuo.
function pushbutton_yasuo_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton_yasuo (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
val = get(handles.popupmenu_yasuo,'Value');
str = get(handles.popupmenu_yasuo, 'String');
switch str{
    
    val};
	
    case 'PCA' % 进行PCA压缩
        h=waitbar(0,'正在压缩中,请耐心等待...');%进度条
        for playtime = 1:300
            waitbar(playtime/1000);
        end

三、运行结果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

四、备注

完整代码或者代写添加QQ912100926
往期回顾>>>>>>
【图像压缩】图像处理教程系列之图像压缩【Matlab 074期】
【图像分割】图像处理教程系列之图像分割(一)【Matlab 075期】
【图像分割】图像处理教程系列之图像分割(二)【Matlab 076期】
【模式识别】银行卡号之识别【Matlab 077期】
【模式识别】指纹识别【Matlab 078期】
【图像处理】基于GUI界面之DWT+DCT+PBFO改进图像水印隐藏提取【Matlab 079期】
【图像融合】CBF算法之图像融合【Matlab 080期】
【图像去噪】自适应形态学之图像去噪【Matlab 081期】
【图像增强】DEHAZENET和HWD之水下去散射图像增强【Matlab 082期】
【图像增强】PSO寻优ACE之图像增强【Matlab 083期】
【图像重建】ASTRA算法之图像重建【Matlab 084期】
【图像分割】四叉树之图像分割【Matlab 085期】
【图像分割】心脏中心线之提取【Matlab 086期】
【图像识别】SVM植物叶子之疾病检测和分类【Matlab 087期】
【图像识别】基于GUI界面之模板匹配手写数字识别系统【Matlab 088期】
【图像识别】基于GUI界面之不变矩的数字验证码识别【Matlab 089期】
【图像识别】条形码识别系统【Matlab 090期】
【图像识别】基于GUI界面RGB和BP神经网络之人民币识别系统【Matlab 091期】
【图像识别】CNN卷积神经网络之验证码识别【Matlab 092期】
【图像分类】极限学习分类器之对遥感图像分类【Matlab 093期】
【图像变换】DIBR-3D之图像变换【Matalb 094期】
【图像分割】模糊聚类算法之FCM图像分割【Matlab 095期】
【模式识别】银行监控系统之人脸识别【Matlab 096期】
【模式识别】基于GUI界面之疲劳检测系统【Matlab 097期】
【图像识别】国外车牌识别【Matlab 098期】
【图像分割】最大类间方差法(otsu)之图像分割【Matlab 099期】
【图像分割】直觉模糊C均值聚类之图像分割IFCM【Matlab 100期】
【图像分割】基于matlab形态学重建和过滤改进FCM算法(FRFCM)之图像分割【Matlab 101期】
【图像增强】局部对比度增强CLAHE算法之直方图增强【Matlab 102期】
【图像融合】Frequency Partition之图像融合【Matlab 103期】
【图像评价】SVM之图像无参考质量评价【Matlab 104期】
【图像边缘检测】最小二乘法用于椭圆边缘检测【Matlab 105期】
【图像加密】基于GUI界面之混沌系统图像加密解密【Matlab 106期】
【图像配准】SIFT算法之图像配准【Matlab 107期】
【图像分割】随机游走算法用于图像分割【Matlab 108期】
【图像分割】形态学重建和过滤改进FCM算法(FRFCM)用于图像分割【Matlab 109期】
【图像分割】图像分割IFCM之直觉模糊C均值聚类【Matlab 110期】
【图像增强】区域相似变换函数与蜻蜓算法之灰度图像增强【Matlab 111期】
【图像直线拟合】最小二乘法之图像直线拟合【Matlab 112期】
【图像去雾】暗通道之图像去雾【Matlab 113期】
【图像识别】基于matlab GUI界面之路面裂缝识别【Matlab 114期】
【图像识别】身份证号码之识别【Matlab 115期】
【图像聚类】FCM和改进之FCM脑部CT图像聚类【Matlab 116期】
【图像评价】CCF算法之图像质量评价【Matlab 117期】
【图像分割】蚁群优化模糊聚类之图像分割【Matlab 118期】
【模式识别】基于GUI界面之水果检测系统【Matlab 119期】
【模式识别】基于GUI界面之水果分类系统【Matlab 120期】
【模式识别】基于GUI界面之水果分级系统【Matlab 121期】
【模式识别】人脸识别之检测脸、眼、鼻子和嘴【Matlab 122期】
【图像处理】基于 GUI界面之图像加解密【Matlab 124期】
【模式识别】基于GUI界面BP网络之手写体大写字母识别【Matlab 125期】
【图像分割】基于GUI界面之医学影像分割【Matlab 126期】
【图频处理】基于GUI界面之环图像处理与音乐播放系统【Matlab 127期】
【图像隐藏】基于Laguerre 变换之图像隐藏【Matlab 128期】
【图像处理】基于dwt函数之实现二维小波变换【Matlab 129期】
【图像处理】分形插值算法之调换图片【Matlab 130期】
【图像边缘检测】基于GUI界面之图像边缘检测系统【Matlab 131期】
【图像分割】基于GUI界面之彩色图像分割【Matlab 132期】
【图像去噪】基于GUI界面之图像滤波去噪【Matlab 133期】
【图像几何运算】基于GUI界面之图像几何运算系统【Matlab 134期】
【图像处理】基于GUI界面之图像处理系统【Matlab 135期】
【图像识别】基于matlab之细胞识别和边缘检测【Matlab 136期】
【模式识别】反馈神经Hopfield的数字识别【Matlab 172期】
【模式识别】指纹图像细节特征提取 【Matlab 173期】
【图像分割】RGB HSV YCbCr Lab颜色空间人脸检测之图像分割【Matlab 174期】
【图像压缩】小波变换之图像压缩【Matlab 175期】
【模式识别】基于GUI界面的火灾检测【Matlab 230期】
【模式识别】基于Hough变换的答题卡识别【Matlab 231期】
【模式识别】二值膨胀差分和椒盐滤波之教室内人数识别系统【Matlab 232期】
【小波变换】基于GUI界面DWT与SVD算法的数字水印 【Matlab 233期】
【模式识别】基于GUI界面的指针式表盘识别【Matlab 234期】
【模式识别】基于Hough变换图片车道线检测 【Matlab 235期】
【图像分割】粒子群优化T熵图像分割【Matlab 236期】
【图像分割】粒子群优化指数熵图像分割【Matlab 237期】
【图像分割】粒子群优化指数熵图像分割【Matlab 238期】
【模式识别】基于GUI贝叶斯最小错误率手写数字识别【Matlab 239期】
【模式识别】PCA手写数字识别【Matlab 240期】
【模式识别】特征匹配的英文印刷字符识别【Matlab 241期】
【模式识别】知识库的手写体数字识别【Matlab 242期】
【模式识别】银行卡数字识别【Matlab 243期】
【边缘检测】插值法亚像素边缘检测【Matlab 248期】
【图像识别】表情检测【Matlab 288期】
【图像检测】LSD直线检测【Matlab 289期】
【图像融合】红外与可见光的融合与配准算法【Matlab 290期】
【图像识别】帧差法跌倒检测【Matlab 291期】
【图像识别】组合BCOSFIRE过滤器进行墙体裂缝识别【Matlab 292期】
【模式识别】中值滤波和二值化的跌倒检测【Matlab 293期】
【图像隐写】DCT的图像隐写【Matlab 294期】
【图像隐写】LSB的图像隐写提取【Matlab 295期】
【图像隐写】高斯模型的JPEG图像隐写【Matlab 296期】
【图像隐写】图像自适应隐写算法wow【Matlab 297期】
【模式识别】基于GUI SVM和PCA的人脸识别【Matlab 298期】
【视频识别】轨迹方法行为识别【Matlab 299期】
【模式识别】基于GUI HSV和RGB模型水果分类【Matlab 300期】
【图像处理】基于GUI数字图像处理平台【Matlab 301期】
【图像分割】视网膜图像分割【Matlab 302期】
【模式识别】k-means聚类的手势识别【Matlab 303期】
【图像处理】Hough变换的人眼虹膜定位【Matlab 304期】
【图像处理】Kalman滤波的目标跟踪【Matlab 305期】
【图像分割】GAC水平集方法实现图像分割【Matlab 306期】
【图像分割】分水岭算法的图像分割【Matlab 307期】
【图像去噪】基于小波变换的图像去噪【Matlab 308期】
【图像融合】基于小波变换的图像融合【Matlab 309期】
【图像识别】图像识别物体计数【Matlab 310期】
【图像增强】模糊集的图像增强【Matlab 311期】
【图像处理】图像RGB三色的合成、分离【Matlab 312期】
【图像处理】鼠标画图【Matlab 313期】
【图像识别】基于二值化条形码识别【Matlab 314期】
【图像压缩】行程编码实现的图像压缩【Matlab 315期】
【图像几何】投影法测距【Matlab 316期】
【边缘检测】插值法亚像素边缘检测【Matlab 317期】
【图像分割】关键像素点的FLICM图像分割【Matlab 318期】
【图像识别】gabor滤波布匹瑕疵检测【Matlab 319期】
【图像识别】基于GUI车牌库识别【Matlab 320期】
【图像识别】国内车牌识别【Matlab 321期】
【图像分割】snake模型的图像分割【Matlab 322期】
【图像去噪】全变分算法图像去噪【Matlab 323期】
【图像去噪】非局部均值(NLM)滤波图像去噪【Matlab 324期】
【图像去噪】中值滤波图像去噪【Matlab 325期】
【边缘检测】元胞自动机图像边缘检测【Matlab 432期】
【图像识别】基于LBP+LPQ算法融合人脸表情识别【Matlab 433期】
【图像识别】OCR识别系统【Matlab 434期】
【边缘检测】拉普拉斯边缘检测与图像增强【Matlab 435期】
【图像处理】全变差图像处理【Matlab 436期】
【图像处理】直方图的医学图像处理【Matlab 437期】
【图像分割】GMM-HMRF图像分割【Matlab 438期】
【图像识别】ksvd字典学习之人脸表情识别【Matlab 439期】
【图像去噪】基于curvelet变换图像去噪【Matlab 440期】
【图像去噪】基于小波变换(中值、硬阙值、软阙值)的图像去噪【Matlab 441期】
【图像配准】sift图像配准【Matlab 442期】
【图像识别】扑克牌灰度二值化识别【Matlab 443期】
【图像转换】二维图转三维图【Matlab 444期】
【图像识别】基于阈值的裂痕、划痕检测【Matlab 445期】
【图像识别】基于Hough变换形状检测【Matlab 446期】
【图像识别】车辆出入库计时系统【Matlab 447期】
【图像识别】基于颜色直方图的危险品识别【Matlab 448期】
【图像识别】基于RBF手写数字识别【Matlab 449期】
【图像识别】花朵分类【Matlab 450期】
【图像增强】拉氏滤波的图像质量提升【Matlab 451期】
【边缘检测】基于CNN的灰度图像边缘提取【Matlab 452期】
【图像增强】虹膜图像高斯滤波、低通滤波、巴特沃斯滤波【Matlab 453期】
【视频识别】高斯模型视频车辆计数【Matlab 454期】
【视频识别】视频的车流量统计【Matlab 455期】
【图像识别】Fisher分类手写数字识别 【Matlab 456期】

猜你喜欢

转载自blog.csdn.net/m0_54742769/article/details/114825683