资源简介
来自D. Krishnan, R. Fergus中提到的方法
The Matlab functions in this directory solve the deconvolution problem in the
paper D. Krishnan, R. Fergus: "Fast Image Deconvolution using
Hyper-Laplacian Priors", Proceedings of NIPS 2009.
代码片段和文件信息
function [yout] = fast_deconv(yin k lambda alpha yout0)
%
%
% fast_deconv solves the deconvolution problem in the paper (see Equation (1))
% D. Krishnan R. Fergus: “Fast Image Deconvolution using Hyper-Laplacian
% Priors“ Proceedings of NIPS 2009.
%
% This paper and the code are related to the work and code of Wang
% et. al.:
%
% Y. Wang J. Yang W. Yin and Y. Zhang “A New Alternating Minimization
% Algorithm for Total Variation Image Reconstruction“ SIAM Journal on
% Imaging Sciences 1(3): 248:272 2008.
% and their FTVd code.
% Input Parameters:
%
% yin: Observed blurry and noisy input grayscale image.
% k: convolution kernel
% lambda: parameter that balances likelihood and prior term weighting
% alpha: parameter between 0 and 2
% yout0: if this is passed in it is used as an initialization for the
% output deblurred image; if not passed in then the input blurry image
% is used as the initialization
%
%
% Outputs:
% yout: solution
%
% Note: for faster LUT interpolation please download and install
% matlabPyrTools of Eero Simoncelli from
% www.cns.nyu.edu/~lcv/software.php. The specific MeX function required
% is pointOp (used in solve_image.m).
%
% Copyright (C) 2009. Dilip Krishnan and Rob Fergus
% Email: dilipfergus@cs.nyu.edu
% continuation parameters
beta = 1;
beta_rate = 2*sqrt(2);
beta_max = 2^8;
% number of inner iterations per outer iteration
mit_inn = 1;
[m n] = size(yin);
% initialize with input or passed in initialization
if (nargin == 5)
yout = yout0;
else
yout = yin;
end;
% make sure k is a odd-sized
if ((mod(size(k 1) 2) ~= 1) | (mod(size(k 2) 2) ~= 1))
fprintf(‘Error - blur kernel k must be odd-sized.\n‘);
return;
end;
ks = floor((size(k 1)-1)/2);
% compute constant quantities
% see Eqn. (3) of paper
[Nomin1 Denom1 Denom2] = computeDenominator(yin k);
% x and y gradients of yout (with circular boundary conditions)
% other gradient filters may be used here and their transpose will then need to
% be used within the inner loop (see comment below) and in the function
% computeDenominator
youtx = [diff(yout 1 2) yout(:1) - yout(:n)];
youty = [diff(yout 1 1); yout(1:) - yout(m:)];
% store some of the statistics
costfun = [];
Outiter = 0;
%% Main loop
while beta < beta_max
Outiter = Outiter + 1;
fprintf(‘Outer iteration %d; beta %.3g\n‘Outiter beta);
gamma = beta/lambda;
Denom = Denom1 + gamma*Denom2;
Inniter = 0;
for Inniter = 1:mit_inn
if (0)
%%% Compute cost function - uncomment to see the original
% minimization function costs at every iteration
youtk = conv2(yout k ‘same‘);
% likelihood term
lh = sum(sum((youtk - yin).^2 ));
if (alpha == 1)
cost = (lambda/2)*lh + sum(abs(youtx(:))) + sum(abs(youty(:)));
else
cost = (lambda/2)*lh + sum(abs(youtx(:)).^
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-08-14 10:18 fastdeconv\
文件 2158368 2009-12-01 11:21 fastdeconv\dsc_0085.jpg
文件 4694 2010-01-02 01:48 fastdeconv\fast_deconv.m
文件 2175 2009-12-02 03:50 fastdeconv\kernels.mat
文件 2135 2010-01-02 01:41 fastdeconv\README.txt
文件 712 2009-12-01 11:43 fastdeconv\snr.m
文件 6057 2009-12-02 03:07 fastdeconv\solve_image.m
文件 1912 2010-01-02 01:37 fastdeconv\test_fast_deconv.m
相关资源
- 基于Matlab的最大熵模糊图像复原算法
- KITTI雷达点云与图像数据融合matlab源码
- 图像分割算法
- SAR图像去噪matlab小波去噪、contourlet变
- 基于HSI空间的图像分割算法
- matlab实现的小波变换彩色图像水印嵌
- 图像边缘检测
- INSAR图像处理
- 等效视数
- 小波变换的压缩感知图像处理
- pcnn脉冲耦合神经网络的图像分割
- 图像的检测消失点
- 图像恢复:快速非局部均值滤波
- 图像去模糊和超分辨处理
- Max CCM1 数字图像相关法
- NGC ACM图像分割
- sfr 1.4 用于计算图像的频率响应
- 图割方法的图像分割
- BP Classification 基于matlab神经网络的遥
- matlab实现图像边缘检测、图像分割、
- CT平行束重建图像
- Ncc 图像配准
- 泊松图像融合算法
- CS Primary tutorial CS压缩传感的初级教学
- 夜间图像增强
- NLTV WI v1 非局部全变分小波域图像修复
- 图像去噪
- JAFFE 数据库是由10个人的7种正面表情
- matlab的高帽变换
- 图像处理
评论
共有 条评论