資源簡介
BLS-GSM代表“Bayesian Least Squares - Gaussian Scale Mixture(貝葉斯最小二乘-高斯尺度混合模型)”。 這個工具箱實現了該篇論文中介紹的算法: J Portilla, V Strela, M Wainwright, E P Simoncelli, Image Denoising using Scale Mixtures of Gaussians in the Wavelet Domain, IEEE Transactions on Image Processing. vol 12, no. 11, pp. 1338-1351, Novembe
代碼片段和文件信息
%?Read?the?file?“ReadMe.txt“?for?more?details?about?this?demo
%?Javier?Portilla?Universidad?de?Granada?Spain
%?Last?time?modified:?14/5/2004
%?Load?original?image
path(path?‘.\Simoncelli_PyrTools‘)
path(path?‘.\Added_PyrTools‘)
path(path?‘.\images‘)
path(path?‘.\denoising_subprograms‘)
clear
%?im0?=?imread(‘images/lena1.png‘);
%im0?=?imread(‘images/lena.png‘);???????????%?Other?examples?of?images?(see?the?“images“?folder)
im0?=?imread(‘images/house.png‘);
im0?=?double(im0);??%?convert?it?to?double
[NyNx]?=?size(im0);
%?and?show?it
figure(1)
rang?=?showIm(im0‘auto‘);title(‘Original?image‘)
%?Noise?Parameters?(assumed?additive?Gaussian?and?independent?of?the
%?original?image)
sig?=?10; ????????%?standard?deviation
PS?=?ones(size(im0)); %?power?spectral?density?(in?this?case?flat?i.e.?white?noise)
seed?=?0;???????????????%?random?seed
%?Pyramidal?representation?parameters
Nsc?=?ceil(log2(min(NyNx))?-?4);??%?Number?of?scales?(adapted?to?the?image?size)
Nor?=?3; ????????????%?Number?of?orientations?(for?X-Y?separable?wavelets?it?can?only?be?3)
repres1?=?‘uw‘;?????????????????????%?Type?of?pyramid?(shift-invariant?version?of?an?orthogonal?wavelet?in?this?case)
repres2?=?‘daub1‘;??????????????????%?Type?of?wavelet?(daubechies?wavelet?order?2N?for?‘daubN‘;?in?this?case?‘Haar‘)
%?Model?parameters?(optimized:?do?not?change?them?unless?you?are?an?advanced?user?with?a?deep?understanding?of?the?theory)
blSize?=?[3?3]; ????%?n?x?n?coefficient?neighborhood?of?spatial?neighbors?within?the?same?subband
????????????????????%?(n?must?be?odd):?
parent?=?0; %?including?or?not?(1/0)?in?the?neighborhood?a?coefficient?from?the?same?spatial?location
????????????????????%?and?orientation?as?the?central?coefficient?of?the?n?x?n?neighborhood?but
????????????????????%?next?coarser?scale.?Many?times?helps?but?not?always.
boundary?=?1; %?Boundary?mirror?extension?to?avoid?boundary?artifacts?
covariance?=?1;?????%?Full?covariance?matrix?(1)?or?only?diagonal?elements?(0).
optim?=?1;??????????%?Bayes?Least?Squares?solution?(1)?or?MAP-Wiener?solution?in?two?steps?(0)
%?Uncomment?the?following?4?code?lines?for?reproducing?the?results?of?our?IEEE?Trans.?on?Im.?Proc.?Nov.?2003?paper
%?This?configuration?is?slower?than?the?previous?one?but?it?gives?slightly?better?results?(SNR)
%?on?average?for?the?test?images?“lena“?“barbara“?and?“boats“?used?in?the?cited?article.
%?Nor?=?8;???????????????????????????%?8?orientations
%?repres1?=?‘fs‘;????????????????????%?Full?Steerable?Pyramid?5?scales?for?512x512
%?repres2?=?‘‘;??????????????????????%?Dummy?parameter?when?using?repres1?=?‘fs‘???
%?parent?=?1;????????????????????????%?Include?a?parent?in?the?neighborhood
%?Generate?a?noisy?image
randn(‘state‘?seed);
noise?=?randn(size(im0));
noise?=?noise/sqrt(mean2(noise.^2));
im?=?im0?+?sig*noise;
%?and?show?it?on?the?screen
figure(2)
showIm(imrang);title([‘Degraded?image?\sigma^2?=‘?num2str(si
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2255??2004-01-07?15:25??BLS-GSM\Added_PyrTools\bound_extension.m
?????文件???????1970??2004-10-14?17:55??BLS-GSM\Added_PyrTools\buildWUpyr.m
?????文件???????3918??2002-11-12?16:30??BLS-GSM\Added_PyrTools\daubcqf.m
?????文件???????1083??2004-01-23?17:51??BLS-GSM\Added_PyrTools\expand.m
?????文件???????8192??2004-03-02?12:28??BLS-GSM\Added_PyrTools\mdwt.dll
?????文件???????8704??2004-03-02?12:28??BLS-GSM\Added_PyrTools\midwt.dll
?????文件???????3196??2002-11-12?16:26??BLS-GSM\Added_PyrTools\mirdwt.c
?????文件???????9216??2004-03-02?12:28??BLS-GSM\Added_PyrTools\mirdwt.dll
?????文件???????5210??2002-11-12?16:31??BLS-GSM\Added_PyrTools\mirdwt.m
?????文件??????????0??2009-10-09?21:59??BLS-GSM\Added_PyrTools\mirdwt.map
?????文件????????616??2009-10-09?21:59??BLS-GSM\Added_PyrTools\mirdwt.mexw32.manifest
?????文件???????3922??2009-10-09?21:52??BLS-GSM\Added_PyrTools\mirdwt.obj
?????文件???????2901??2002-11-12?16:26??BLS-GSM\Added_PyrTools\mrdwt.c
?????文件???????8704??2004-03-02?12:28??BLS-GSM\Added_PyrTools\mrdwt.dll
?????文件???????5068??2002-11-12?16:32??BLS-GSM\Added_PyrTools\mrdwt.m
?????文件??????????0??2009-10-09?21:48??BLS-GSM\Added_PyrTools\mrdwt.map
?????文件????????616??2009-10-09?21:48??BLS-GSM\Added_PyrTools\mrdwt.mexw32.manifest
?????文件???????1682??2003-03-19?15:23??BLS-GSM\Added_PyrTools\reconWUpyr.m
?????文件????????977??2004-01-23?17:53??BLS-GSM\Added_PyrTools\shrink.m
?????文件????????248??1996-12-09?16:36??BLS-GSM\Added_PyrTools\snr.m
?????文件???????1250??2005-03-14?16:15??BLS-GSM\change_log.txt
?????文件???????1053??2005-02-23?10:49??BLS-GSM\change_log.txt.$$$
?????文件???????1833??2004-11-26?13:24??BLS-GSM\denoising_subprograms\decomp_reconst.m
?????文件???????2463??2004-11-26?13:22??BLS-GSM\denoising_subprograms\decomp_reconst_full.m
?????文件???????2666??2004-05-14?21:54??BLS-GSM\denoising_subprograms\decomp_reconst_W.m
?????文件???????2930??2005-02-23?10:19??BLS-GSM\denoising_subprograms\decomp_reconst_WU.m
?????文件???????6926??2005-03-14?16:10??BLS-GSM\denoising_subprograms\denoi_BLS_GSM.m
?????文件???????7304??2004-10-14?17:56??BLS-GSM\denoising_subprograms\denoi_BLS_GSM_band.m
?????文件???????3513??2009-10-21?11:16??BLS-GSM\denoi_demo.m
?????文件???????7466??2005-02-23?11:08??BLS-GSM\ReadMe.txt
............此處省略202個文件信息
- 上一篇:六軸機械臂正解FK和逆解IK算法
- 下一篇:1/4車輛懸架simuli
nk模型
評論
共有 條評論