24小时热门版块排行榜    

查看: 156  |  回复: 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 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 有时候,自然基金真的不能太认真 (我的申报经验) +9 majunge000 2026-08-11 11/550 2026-08-15 23:20 by botar
[基金申请] 时间戳又变了8-15 +12 archvillain 2026-08-15 23/1150 2026-08-15 20:47 by foyo404
[基金申请] filecode=后面第一个是大写字母 +6 wangze12014 2026-08-14 7/350 2026-08-15 20:12 by gltch
[基金申请] 小木虫上这么多卖论文的,真有人买论文么?感觉没必要啊 +12 Tide man 2026-08-10 13/650 2026-08-15 16:34 by 氺木
[基金申请] 关于Filecode分析方法 +10 majunge000 2026-08-10 13/650 2026-08-15 12:26 by hanpeng972
[基金申请] 各位道友,我要去昆明玩几天,回来见。 +7 Tide man 2026-08-14 8/400 2026-08-15 01:11 by arzu_hma
[基金申请] 咱们一起用铁证分析2026国家社科基金中标与否 +7 启萌科技 2026-08-12 22/1100 2026-08-14 23:45 by Noways
[基金申请] 是这周出结果还是下周出结果? +4 yuleib84 2026-08-11 4/200 2026-08-14 23:05 by lfy8008
[基金申请] 奇怪,两个人的filecode固定段从头到尾一模一样 +8 布布和一二 2026-08-10 11/550 2026-08-14 14:58 by Equinoxhua
[硕博家园] 读博的好处 +4 lnee 2026-08-11 4/200 2026-08-14 10:20 by ahsoarli
[基金申请] filecode +15 documentary 2026-08-10 17/850 2026-08-14 10:08 by kissu88
[基金申请] FileCode能看出啥? +10 要乐观耀哥 2026-08-10 32/1600 2026-08-14 09:37 by 要乐观耀哥
[基金申请] 我的国基提前知道中了,可是同事的操作让我实在接受不了,怎么会有这样的人 +10 家与远方 2026-08-10 15/750 2026-08-14 02:08 by 绵羊哥哥
[基金申请] 重要来源:本周末出结果 +10 瞬息宇宙 2026-08-12 10/500 2026-08-13 15:46 by likettle
[基金申请] 结合人工智能,周易传统文化,filecode打分制来了,3分以上希望很大。 +3 Tide man 2026-08-12 4/200 2026-08-13 08:35 by ZJTJZ
[基金申请] 帮忙看看fileCode +7 wwncly 2026-08-10 13/650 2026-08-11 19:36 by 冰心玉壶晴
[基金申请] 为什么网上很多人说本周 12号出结果 +6 瞬息宇宙 2026-08-10 7/350 2026-08-11 19:25 by Tide man
[基金申请] 确定了,国自然21号放榜 +6 布布和一二 2026-08-10 7/350 2026-08-10 19:15 by 2000zf36392
[基金申请] 据悉今年马上要出结果了 +7 瞬息宇宙 2026-08-10 8/400 2026-08-10 12:42 by Vivilian
[基金申请] 面上项目filecode邪修 +5 西山十月 2026-08-09 7/350 2026-08-10 07:32 by 仁砚薪传
信息提示
请填处理意见