24小时热门版块排行榜    

Znn3bq.jpeg
查看: 147  |  回复: 2
当前主题已经存档。

lgl820420

[交流] 谁能帮在程序员联合开发网(pudn.com)下东西【有效期至2008年5月27日】

下面是文件页面的链接:http://www.programsalon.com/down ... h/detail173516.html
麻烦帮我下一下传给我!
邮箱是liuguoliang126@126.com

[ Last edited by sxyxs13754 on 2008-5-26 at 08:39 ]

» 猜你喜欢

已阅   关注TA 给TA发消息 送TA红花 TA的回帖

lgl820420

[url]有效期【有效期至2008年5月27日】[/url]

有效期【有效期至2008年5月27日】
2楼2008-05-25 01:25:50
已阅   关注TA 给TA发消息 送TA红花 TA的回帖

shootyou25

金虫 (小有名气)

小波阈值去噪声(MATLAB)给你!!!

★ ★ ★ ★
lgl820420(金币+4,VIP+0):谢谢
sparrow1290(金币-8,VIP+0):非法转移金币http://emuch.net/bbs/viewthread.php?tid=830277&fpage=1
function varargout = wavlet(varargin)
% WAVLET M-file for wavlet.fig
%      WAVLET, by itself, creates a new WAVLET or raises the existing
%      singleton*.
%
%      H = WAVLET returns the handle to a new WAVLET or the handle to
%      the existing singleton*.
%
%      WAVLET('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in WAVLET.M with the given input arguments.
%
%      WAVLET('Property','Value',...) creates a new WAVLET or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before wavlet_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to wavlet_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 wavlet

% Last Modified by GUIDE v2.5 21-Jun-2004 11:13:32

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @wavlet_OpeningFcn, ...
                   'gui_OutputFcn',  @wavlet_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin & isstr(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 wavlet is made visible.
function wavlet_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 wavlet (see VARARGIN)

% Choose default command line output for wavlet
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes wavlet wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = wavlet_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 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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
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)
global pp;
pp=str2double(get(hObject,'String'));
% Hints: get(hObject,'String') returns contents of edit1 as text
%        str2double(get(hObject,'String')) returns contents of edit1 as a double


% --- 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)
global pp;
global  psnr_noise_remove;
load psnr_noise_remove;
global psnr;
load psnr;
%读入原始图像并显示
i=imread('lena.bmp');
subplot(2,2,1);
imshow(i);
title('原始图像');
axis square;

%生成含噪图像并显示
j=imnoise(i,'gaussian',0,pp);
subplot(2,2,2);
imshow(j);
title('含噪图像');
axis square;
%用sym4小波函数对j进行2层分解
[c,l]=wavedec2(j,2,'sym4');
%实现低通滤波消噪
a1=uint8(wrcoef2('a',c,l,'sym4',2));
%用coif2小波函数对j进行2层分解
[gc,gl]=wavedec2(a1,2,'coif2');
n=[1,2];%设置尺度向量
p=[10.28,24.08];%设置阈值向量
%对三个高频系数进行阈值处理
nc=wthcoef2('h',gc,gl,n,p,'s');
nc=wthcoef2('v',gc,gl,n,p,'s');
nc=wthcoef2('d',gc,gl,n,p,'s');
mc=wthcoef2('h',gc,gl,n,p,'s');
mc=wthcoef2('v',gc,gl,n,p,'s');
mc=wthcoef2('d',gc,gl,n,p,'s');
%对更新后的小波分解结构进行阈值处理
x2=waverec2(mc,gl,'coif2');
%进行中值滤波
for ii=1:252;
    for jj=1:252;
         temp=0;
         for m=0:3
             for n=0:3
                 temp=temp+double(x2(ii+m,jj+n));
             end
          end
          temp=temp/16;
          x4(ii,jj)=temp;
     end
end
for ii=253:256
    for jj=253:256
        x4(ii,jj)=double(i(ii,jj));
    end
end
%显示去噪图像   
subplot(2,2,3);
imshow(uint8(x4));
title('消噪图像');
axis square;
%计算psnr
q=0.0;
for x=1:256;
    for j=1:256;
        diff=x4(x,j)-double(i(x,j));     
        q=q+diff*diff;
    end
end
    psnr_y = q /  (256*256);
    psnr_y =  (255 * 255)/psnr_y;
set(psnr_noise_remove,'String',psnr_y);
for ii=1:10
    if psnr(ii)==0
        psnr(ii)=psnr_y;
        break;
    end
end
save psnr psnr;
% --- 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
global psnr_noise_remove;
% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

psnr_noise_remove=hObject;
save psnr_noise_remove psnr_noise_remove;

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
3楼2008-05-25 01:27:17
已阅   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 lgl820420 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 化学070300 求调剂 +16 哈哈哈^_^ 2026-04-12 16/800 2026-04-13 00:17 by wadb64
[找工作] 山东高校教师考核超级无底线,员工过不下去啦 +4 qut2026 2026-04-09 9/450 2026-04-12 00:54 by qut2026
[考研] 调剂 +10 只叙离别辞 2026-04-09 12/600 2026-04-11 20:57 by 逆水乘风
[考研] 调剂 +4 电气300求调剂不 2026-04-08 7/350 2026-04-11 10:44 by 紫曦紫棋
[考研] 工科273调剂 +6 X1999 2026-04-09 7/350 2026-04-11 10:23 by zhq0425
[考研] 297求调剂 +9 Kwgyz 2026-04-09 9/450 2026-04-11 10:09 by zhq0425
[考研] 求调剂 +13 雪逢冬 2026-04-10 13/650 2026-04-11 09:58 by 猪会飞
[考研] 282,求调剂 +12 jggshjkkm 2026-04-09 14/700 2026-04-11 09:39 by 猪会飞
[考研] 085402通信工程调剂,有4项学科竞赛国奖(电赛国二),硕士研究生调剂自荐信。 +5 m永o不v言o弃m 2026-04-09 5/250 2026-04-11 09:33 by zhq0425
[考研] 263能源动力专硕求调剂 +3 加大号饭盒袋 2026-04-10 3/150 2026-04-10 22:23 by 286640313
[考研] 初试261 +3 Asht少 2026-04-10 6/300 2026-04-10 16:38 by Asht少
[考研] 一志愿211,化学学硕,310分,本科重点双非,求调剂 +27 努力奋斗112 2026-04-07 30/1500 2026-04-10 15:06 by Kilig0317
[考研] 一志愿华东师范生物学326分,求调剂 +8 刘墨墨 2026-04-09 8/400 2026-04-10 12:00 by pengliang8036
[考研] 求调剂 +11 翩翩一书生 2026-04-09 13/650 2026-04-10 10:27 by liuhuiying09
[考研] 材料复试求调剂 +20 xhhdjdjsjks 2026-04-09 20/1000 2026-04-10 10:25 by 孙小小12457
[考研] 复试调剂,一志愿郑州大学材料与化工289分 +31 硕星赴 2026-04-08 31/1550 2026-04-09 16:54 by Delta2012
[考研] 274求调剂 +5 山阿蔓 2026-04-07 5/250 2026-04-09 15:28 by 18828373951
[考研] 求调剂 +15 熊二想上岸 2026-04-06 15/750 2026-04-08 04:53 by 无际的草原
[考研] 22408 318分求调剂 +4 勤奋的小笼包 2026-04-06 6/300 2026-04-07 15:05 by 纸鹤555
[考研] 328求调剂 +4 ghhh88888 2026-04-06 5/250 2026-04-07 14:45 by ghhh88888
信息提示
请填处理意见