AnatLevin
所属分类:图形图像处理
开发工具:matlab
文件大小:13963KB
下载次数:35
上传日期:2014-07-02 16:00:46
上 传 者:
sawwhite
说明: 本算法主要采用变分贝叶斯求解图像忙恢复问题。
(This package contains implementations of the MAP_k
blind deconvolution algorithms described in the paper
"Efficient Marginal Likelihood Optimization in Blind Deconvolution"
Levin, Weiss, Durand and Freeman,
)
文件列表:
Demo.m (289, 2014-05-15)
LoadFilter.m (410, 2014-01-03)
MOGparams.mat (276, 2010-11-11)
comp_upto_shift.m (1106, 2011-04-04)
conjgrad_deconv_g.m (1996, 2010-11-11)
conjgrad_deconv_g_smp_wy.m (1956, 2010-11-11)
conjgrad_deconv_i.m (2065, 2010-11-11)
conjgrad_deconv_i_cycconv.m (1552, 2010-11-11)
convfun.m (210, 2010-11-11)
deconv1.m (1811, 2010-11-11)
deconvL2_w.m (2757, 2010-11-11)
deconvSps.m (1924, 2010-11-11)
deconv_diagfe_filt_sps.m (2812, 2011-04-04)
deconv_diagfe_img_sps.m (2764, 2011-04-04)
deconv_freq_filt_gauss.m (3461, 2011-04-04)
deconv_freq_img_gauss.m (3384, 2011-04-04)
deconv_smp_filt_sps.m (2829, 2011-04-04)
downSmpImC.m (350, 2010-11-11)
fftconvf.m (576, 2010-11-11)
filt_y.m (283, 2010-11-11)
fixsize.m (764, 2010-11-11)
flat3DArray.m (363, 2010-11-11)
flp.m (42, 2010-11-11)
getAutoCor.m (1693, 2010-11-11)
getAutoCorCyc.m (857, 2010-11-11)
getAutoCorFreqDiagCov.m (355, 2010-11-11)
getConvMat.m (1068, 2010-11-11)
getCorAb.m (943, 2010-11-11)
getCorAbDiagCov.m (571, 2010-11-11)
getCorAbFreqDiagCov.m (721, 2010-11-11)
getCorAbFreqDiagCovCyc.m (227, 2010-11-11)
getCory.m (250, 2010-11-11)
getCoryCyc.m (360, 2010-11-11)
goodfactor.m (116, 2010-11-11)
multires_deconv.m (1618, 2010-11-11)
normexp.m (144, 2010-11-11)
read_res.m (8468, 2010-11-11)
resizeKer.m (115, 2010-11-11)
set_sizes.m (217, 2010-11-11)
... ...
This package contains implementations of the MAP_k
blind deconvolution algorithms described in the paper
"Efficient Marginal Likelihood Optimization in Blind Deconvolution"
Levin, Weiss, Durand and Freeman, CVPR2011
Usage of this code is free for research goals only.
(c) Anat Levin, anat.levin@weizmann.ac.il, March 2011.
-------------------------------------------------------------
Quick start:
The package contains 5 test*.m files which run each of the 5 algorithms
described in the manuscript, on each of the 32 test images of Levin etal's
CVPR2009 paper.
There are also 5 deconv* functions which set up a deconvolution problem
which matches each algorithm.
The best algorithm is free energy with a diagonal covariance approximation,
in the filters domain (that is, solving for each derivative independently,
without enforcing integrability). So if you are mostly interested in a
good blind deconvolution algorithm- start with this one.
Also note that the sampling covariance approximation algorithm is *very* slow.
data directories:
test_data/ - contains the 32 test images
resdir/- a subset of the results of the 5 test* scripts, as well as
Fergus and Cho algorithms. (We could not include all results
due to the limits on the size of the supplementary file.)
To read the results and plot error statistics, see the file
read_res.m
----------------
More on the structure of the code:
The attached code is meant to be a general enough to handle several versions
of MAP_k algorithms.
The main object passed between the functions and carrying the deconvolution
problem is a struct "prob"
This struct have fields indicating the various algorithmic options,
as well as the imgs and kernel data. See fields description below.
We have 5 different deconv* functions which set the problem parameters for
each of the 5 implemented algorithms.
After setting the relevant parameters the function 'multires_deconv' is called.
This function builds a pyramid, downscale and upscale the problem between the
different layers.
To solve for each layer, it calls deconv1
Deconv1 basically alternate between updating x and updating k, we have several
different functions for updating x and k, depending on the specific algorithm
chosen.
Data fields:
prob.y- blurred image
prob.k- current kernel estimation
prob.filty -derivatives of blurred image when solving in the filter space
prob.x- current x estimation
prob.filtx- current estimation of x derivatives (when solving in the filter
space, that's our actual estimated data)
prob.xcov- cell of xcov, (if we solve in the filter space, there is a
separate covariance for every filter.
When we assume a diagonal covariance or a frequency diagonal
covariance, this is a matrix whose size is equal to the size of
the image x. When we use the sampling approach we also compute
non diagonal elements, so this is a sparse NxN matrix.
prob.freeeng- the free energy at every iteration, useful as a sanity check
that we are doing things right- the free energy should decrease
from iteration to iteration. however, note that since in practice
we change the noise variance in each iteration, we ruin the
expected decrease. Also, to ensure proper decrease we should use
the x from the previous iteration and not initialize in every
iter (see prob.init_x_every_itr below)
Algorithmic option fields:
prob.prior_pi, prob.prior_ivar- MOG prior parameters- weights and inverse
variance of each mixture component
prob.filts- the filters on which the prior is placed. Our default are
the simple derivatives [-1 1], [-1 1]^T, but more sophisticated
filters can be used.
prob.cycconv- do we assume the convolution is cyclic? in most cases not.
(relevant only for the frequency deconvolution case).
prob.covtype- the type of covariance matrix approximation-
can be 'diag', 'freqdiag' or 'smp'
prob.update_x- how do we solve for x- 'conjgrad' solver or 'freqdeconv';
prob.filt_space- do we represent the problem in the filter (derivatives)
space or in the image space. that is do we actually solve for
the image, or just for an independent set of derivatives,
without enforcing integrability.
prob.init_x_every_itr- do we initialize x in every update x iteration, and
start the iterative reweighted least squares from scratch, or
do we use the solution from the previous iteration. We noticed
that the convergence is better when we initialize every iteration.
However, to ensure that the free energy is perfectly decreasing
from iteration to iteration, we actually need to continue from
the previous solution.
prob.k_prior_ivar-regularization weight when solving for the kernel
prob.cycconv- do we assume the convolution is cyclic? in most cases not.
(relevant only for the frequency deconvolution case).
近期下载者:
相关文件:
收藏者: