elleSR_0.2
所属分类:matlab编程
开发工具:matlab
文件大小:496KB
下载次数:359
上传日期:2012-03-24 19:37:22
上 传 者:
gupanzhong
说明: 多帧图像超分辨率重建,里面有huber 马尔科夫,ML超分辨率重建,对学习超分辨率很有帮助。
(Multi-frame image super-resolution reconstruction, which has the the huber Markov, ML super-resolution reconstruction is helpful in learning the super-resolution.)
文件列表:
elleSR_0.2\elle_eval_huber.cpp (2165, 2012-02-23)
elleSR_0.2\elle_eval_huber.mexw32 (8704, 2012-03-24)
elleSR_0.2\elle_eval_huber_grad.cpp (3214, 2012-02-23)
elleSR_0.2\elle_eval_huber_grad.mexw32 (9216, 2012-03-24)
elleSR_0.2\getAvim.cpp (9529, 2012-02-23)
elleSR_0.2\getAvim.mexw32 (10752, 2012-03-24)
elleSR_0.2\lena.png (151199, 2010-02-23)
elleSR_0.2\makeLR.cpp (8634, 2012-02-23)
elleSR_0.2\makeLR.mexw32 (11776, 2012-03-24)
elleSR_0.2\makeW.cpp (12422, 2012-02-23)
elleSR_0.2\makeW.mexw32 (11776, 2012-03-24)
elleSR_0.2\mex_amub.cpp (5219, 2012-02-23)
elleSR_0.2\mex_amub.mexw32 (9728, 2012-03-24)
elleSR_0.2\netlab3_3\conffig.m (942, 2004-06-18)
elleSR_0.2\netlab3_3\confmat.m (1349, 2004-06-18)
elleSR_0.2\netlab3_3\conjgrad.m (4715, 2004-06-18)
elleSR_0.2\netlab3_3\consist.m (2607, 2004-06-18)
elleSR_0.2\netlab3_3\Contents.m (11172, 2004-06-18)
elleSR_0.2\netlab3_3\convertoldnet.m (724, 2004-06-18)
elleSR_0.2\netlab3_3\datread.m (2611, 2004-06-18)
elleSR_0.2\netlab3_3\datwrite.m (1141, 2004-06-18)
elleSR_0.2\netlab3_3\dem2ddat.m (1362, 2004-06-18)
elleSR_0.2\netlab3_3\demard.m (6175, 2004-06-18)
elleSR_0.2\netlab3_3\demev1.m (5511, 2004-06-18)
elleSR_0.2\netlab3_3\demev2.m (8201, 2004-06-18)
elleSR_0.2\netlab3_3\demev3.m (5718, 2004-06-18)
elleSR_0.2\netlab3_3\demgauss.m (2267, 2004-06-18)
elleSR_0.2\netlab3_3\demglm1.m (2449, 2004-06-18)
elleSR_0.2\netlab3_3\demglm2.m (2552, 2004-06-18)
elleSR_0.2\netlab3_3\demgmm1.m (6067, 2004-06-18)
elleSR_0.2\netlab3_3\demgmm2.m (4593, 2004-06-18)
elleSR_0.2\netlab3_3\demgmm3.m (5799, 2004-06-18)
elleSR_0.2\netlab3_3\demgmm4.m (6414, 2004-06-18)
elleSR_0.2\netlab3_3\demgmm5.m (4886, 2004-06-18)
elleSR_0.2\netlab3_3\demgp.m (4614, 2004-06-18)
elleSR_0.2\netlab3_3\demgpard.m (4167, 2004-06-18)
elleSR_0.2\netlab3_3\demgpot.m (1036, 2004-06-18)
elleSR_0.2\netlab3_3\demgtm1.m (4889, 2004-06-18)
elleSR_0.2\netlab3_3\demgtm2.m (5579, 2004-06-18)
elleSR_0.2\netlab3_3\demhint.m (1509, 2004-06-18)
... ...
Bayesian super-resolution
This is Lyndsey's SR code from:
http://www.robots.ox.ac.uk/~elle/SRcode/
Start by making sure you have Netlab and mex_amub.cpp, and that all mex
files have been compiled for your machine. I also have an nrand.h to define
g***ev.c and ran1.c from Numerical Recipes, which are used in generating
the iid noise samples in makeLR.c.
Running SR_demo for a quick intro to the simple functions.
--------------------------------------------------------------------------
A FEW MORE NOTES:
The W produced by this code is the TRANSPOSE of the W in my papers --
it's just easier to do it this way in Matlab. That means that W is an
N-by-M sparse matrix, where N is the number of pixels in the
super-resolution image, and M is the *total* number of low-resolution
pixels. It's worth remembering :-)
This code works with Matlab structures. The input to the "makeW"
function consists of a K-element structure (where there are K
low-resolution images), with fields "im" (containing the k^{th} image), H
(the 3-by-3 homography mapping pixel locations in the corresponding
low-resolution image into the super-resolution frame), la (the
multiplicative photometric parameter, lambda_alpha), and lb (the
additive photometric parameter, lambda_beta).
It is assumed that if H for the k^{th} image is the identity, then its
centre lines up with the centre of the super-resolution frame, and
there is simply a scaling of "zoom" between them, where the zoom
factor is external to the homographies in the struct representation.
The Gaussian blur representing the PSF on each low-resolution image
has a standard deviation that is measured in *low-resolution pixels*
-- note that this differs from a number of super-resolution papers,
which use the blur measured on the super-resolution image (which makes
less sense!).
--------------------------------------------------------------------------
Generating Synthetic Data:
IN:
o(k).v -- vertical size of LR image
o(k).h -- horizontal size of LR image
o(k).H -- 3x3 matrix mapping from LR image to common reference plane
o(k).la -- photometric prarm (multiplicative)
o(k).lb -- photometric prarm (additive)
o(k).n -- noise standard deviation
o(k).g -- standard deviation of Gaussian PSF (gamma)
OUT:
o(k).im -- low-resolution image
o(k).noise -- noise image
o(k).orig -- original (no-noise) image
--------------------------------------------------------------------------
Generating the System Matrix, W:
IN:
o -- includes LR images, PSF param and {geometric, photometric} registration params.
OUT:
W -- transpose of system matrix
Y -- M-by-1 vector of all LR image pixels in column-major order
La -- M-by-1 vector of multiplicative photometric factors
Lb -- M-by-1 vector of additive photometric terms
SR seeks the best x such that Y = diag(La)*W'*x+Lb.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
SUMMARY OF FILES:
M-files:
SR_demo.m
[o,gtruth] = synthdata_demo;
[im,opts,flog,plog,sclog] = superres_ml(W,Y,La,Lb,avim,opts);
im_huber = superres_huber(W,Y,La,Lb,avim,alp,nu,opts);
Mex files:
makeLR.c (see below for further description)
makeW.c (see below for further description)
getAvim.c (see below for further description)
elle_eval_huber.c eout = elle_eval_huber(x,alp,bet,biv,bih);
elle_eval_huber_grad.c g = elle_eval_huber_grad(x,alp,bet,biv,bih);
/* [im,noise,orig] = makeLR(biv,bih,o);
*
* INPUTS:
* biv, bih: vertical and horizontal sizes for the high-res image.
* o: the super-res problem datastructure, which must be a MATLAB struct with the following entries:
* o.H is a 3x3 double representing the homography taking points in the LR image into the SR image.
* o.la is the multiplicative photometric parameter.
* o.lb is the additive photometric parameter.
* o.g is the sigma for the Gaussian PSF.
* o.n is the sigma for the additive Gaussian iid noise on each pixel.
* o.v vertical size for the image.
* o.h horizontal size for the image.
* NOTE: if o is larger than 1x1, only the first part is used (i.e. this function doens't
* currently produce a stack of images, just one at a time).
*
* OUTPUTS:
* im: the generated low-resolution image, including image noise.
* noise: the noise image.
* orig: the low-resolution image without the added noise.
*/
/* [W,Y,La,Lb,M] = makeW(biv,bih,o);
*
* INPUTS:
* biv, bih: vertical and horizontal sizes for the high-res image.
* o: the super-res problem datastructure, which must be a MATLAB struct with the following entries:
* o(i).H is a 3x3 double representing the homography taking points in the i^th LR image into the SR image.
* o(i).la is the multiplicative photometric parameter for image i.
* o(i).lb is the additive photometric parameter for image i.
* o(i).g is the sigma for the Gaussian PSF associated with image i.
* o(i).im is the i^th image. W doesn't depend on image pixels, but the image size is important.
*
* OUTPUTS:
* W: the super-res system matrix. Note that this is the TRANSPOSE of most of my papers' "W" matrices, since it's
* rather easier to compute this way.
* Y: A KMx1 vector containing all the low-res pixel values, where "KM" is the total number of low-res pixels in the data.
* La: a KMx1 vector of multiplicative photometric params (yes, lots of repeated values).
* Lb: a KMx1 vector of additive photometric params.
* M: a 10xK matrix of geometric registration values.
*/
/* [avim,msk,M] = getAvim(biv,bih,o);
*
* INPUTS:
* biv, bih: vertical and horizontal sizes for the average image.
* o: the super-res problem datastructure, which must be a MATLAB struct with the following entries:
* o(i).H is a 3x3 double representing the homography taking points in the i^th LR image into the SR image.
* o(i).la is the multiplicative photometric parameter for image i.
* o(i).lb is the additive photometric parameter for image i.
* o(i).g is the sigma for the Gaussian PSF associated with image i.
* o(i).im is the i^th image. W doesn't depend on image pixels, but the image size is important.
*
* OUTPUTS:
* avim: the average image (which will be of size biv-by-bih).
* msk: a double matrix of size biv-by-bih indicating which pixels in avim were estimated.
* -- average image pixels with negligible support from any of the PSFs of the low-res
* image pixels are returned as zeros.
* M: a 10xK matrix of geometric registration values.
*
*/
近期下载者:
相关文件:
收藏者: