-
大小: 10.17MB文件类型: .rar金币: 1下载: 0 次发布日期: 2023-11-09
- 语言: Matlab
- 标签: deblur kernel regression super
资源简介
核回归方法(kernel regression)方法的去模糊MATLAB源码。来自著名的美国加州理工大学mdsp实验室,里面还包含一篇利用核回归方法去模糊方面的经典文献
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% STEERING KERNEL DEBLURRING EXAMPLE 2 %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This simulation example demonstrates the kernel regression-based
% deblurring method with the steering kernel function and this generates
% the deblurred image of Fig.11(g) in the paper “Deblurring Using
% Locally-Adaptive Kernel regression.
%
% [Details]
% test image : cameraman
% PSF : 19 x 19 uniform
% BSNR : 25[dB]
%
% [History]
% Oct 12 2007 : coded and debugged by Hiro
% the mirroring width
mg = 15;
% read a test image
img = double(imread(‘cameraman.tif‘)); % Cameraman image
% create a PSF
PSFsupport = 19;
A = fspecial(‘ave‘ PSFsupport); % 19 x 19 uniform
% blur the test image
imgb = conv2verge(img A);
% add white Gaussian noise
BSNR = 25; % blurred signal to noise ration in [dB]
vn = var(imgb(:)) / 10^(BSNR/10); % compute the noise variance
randn(‘state‘ 0); % initialize the noise generator
y = imgb + randn(size(imgb)) * sqrt(vn); % add white noise to the blurred image
% mirror the edges
y = EdgeMirror(y [mg mg]);
[N M] = size(y);
% initialization
% the pilot estimation by weiner filter
K = 0.001;
Af = fft2(A 512 512);
F = (abs(Af).^2 ./ (abs(Af).^2 + K)) ./ Af .* fft2(EdgeMirror(y(1+mg:end-mg 1+mg:end-mg) [128 128]));
y_init = ishift2(real(ifft2(F)) 9 9);
y_init = y_init(129-mg:end-128+mg 129-mg:end-128+mg);
y_init = double(round0_255(y_init));
fig_h = figure;
imshow(uint8(y_init(1+mg:end-mg 1+mg:end-mg))); colormap(gray); axis image;
pause(0.1);
% initialization by the second order classic kernel regression
title(‘Initializing by the second order classic kernel regression...‘);
pause(0.1);
Q = 2; % the regression order
hc = 0.8; % the global smoothing parameter
ktype = ‘ga‘; % the kernel type (‘ga‘ = Gaussian)
ksize = 7; % the kernel support size
[U Ux Uy Uxx Uxy Uyy] = ckr_a(y_init [0;0] 1 1 Q hc ktype ksize);
U = y_init;
% parameter
h = 1.0; % the global smoothing parameter for the likelihood term
hu = 1.5; % the global smoothing parameter for the regularization term
nu = 0.3; % the step size
IT = 6500; % the number of iterations
ksize = 7; % the kernel support size
ktype = ‘ga‘; % the kernel support size
reg_lambda = 0.75; % the regularization parameter
radius = (ksize - 1) / 2;
% parameters for the steering matrices
wsize = 11; % the analysis window size
lambda = 1; % the regularization parameter
alpha = 0.5; % the structure sensitivity
r = 1;
[x2 x1] = meshgrid(-radius:radius -radius:radius);
x1sq = x1.^2;
x2sq = x2.^2;
x1x2 = x1.* x2;
for it = 1 : IT
% initialize error corrections
ec_U = zeros(N M);
ec_Ux = zeros(N M);
ec_Uy = zeros(N M);
% every 50 iterations we re-create the weight matrices
if mod(it-1 50) == 0
% estimate the orientation information from the estimated gradients
% for the regularization term
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 8208 2007-10-12 02:39 Kernelba
文件 8209 2007-10-12 02:32 Kernelba
文件 8353 2008-01-02 03:03 Kernelba
文件 7820 2007-10-12 02:28 Kernelba
文件 10614505 2009-11-27 11:14 Kernelba
文件 65240 1997-02-22 07:28 Kernelba
文件 151199 2005-08-17 17:05 Kernelba
..A.SH. 10240 2010-01-01 12:43 Kernelba
文件 390 2009-11-27 11:16 Kernelba
文件 1095 2006-01-20 13:57 Kernelba
文件 10586 2006-02-07 14:21 Kernelba
文件 7588 2006-02-07 14:17 Kernelba
文件 512 2006-02-14 14:52 Kernelba
文件 230 2005-11-19 15:54 Kernelba
文件 406 2005-12-17 15:45 Kernelba
文件 303 2007-01-21 01:46 Kernelba
文件 854 2007-01-21 01:46 Kernelba
文件 1486 2006-10-23 13:44 Kernelba
文件 4584 2006-09-04 15:40 Kernelba
文件 149 2005-10-09 13:29 Kernelba
文件 1377 2007-10-11 17:27 Kernelba
文件 273 2006-09-01 17:00 Kernelba
目录 0 2010-01-01 12:44 Kernelba
目录 0 2010-01-01 12:43 Kernelba
目录 0 2009-11-27 11:32 Kernelba
目录 0 2009-11-27 11:32 Kernelba
----------- --------- ---------- ----- ----
10903607 26
- 上一篇:音乐检索系统MATLAB程序.zip
- 下一篇:ECO配置好的MATLAB版本
相关资源
- Deblurring Images Matrices Spectra and Filteri
- kernel adapting filter
- KPCA算法实现代码,MATLAB
- KCF (Kernelized Correlation Filters)Matlab源
- 基于核回归 Kernel regression 的图像处理
- LSTM-regression-master.zip
- kernel function_matlab
- matlab 高斯过程回归模型 matlab Gaussia
- ELM kernel 基于极限学习机的不平衡数据
- ELM_kernel 核极限学习机
- BlurKernelEstimation 模糊图像去模糊处理
- Gaussian-process-regression 高斯过程回归及
- 核函数的ELM算法
- image_deblur_and_source_image 图像去模糊处
- Exercise5-Softmax-Regression 斯坦福深度学习
- 2d-logistic-regression 二分类逻辑回归ma
- elm_kernel_trainapredict Kernel_ELM传说中的核
- Elm_KElm Elm和KernelElm算法matlab实现
- deblur 本源码是关于图像盲去模糊的算
- RobustMotionDeblur 运动模糊图像的去模糊
- kfcm
- elm_kernel ELM 极限学习机的核函数 MAT
- SVM and Kernel Methods Matlab Toolbox
- 回归森林 regression forest Matlab代码
评论
共有 条评论