资源简介
基于matlab开发的因离焦产生的图像模糊处理,利用盲卷积处理方法,取得很好的效果
代码片段和文件信息
function [x y k] = center_kernel_separate(x y k)
%
% Center the kernel by translation so that boundary issues are mitigated. Additionally
% if one shifts the kernel the the image must also be shifted in the
% opposite direction.
% get centre of mass
mu_y = sum([1:size(k 1)] .* sum(k 2)‘);
mu_x = sum([1:size(k 2)] .* sum(k 1));
% get mean offset
offset_x = round( floor(size(k 2) / 2) + 1 - mu_x );
offset_y = round( floor(size(k 1) / 2) + 1 - mu_y );
fprintf(‘CenterKernel: weightedMean[%f %f] offset[%d %d]\n‘ mu_x-1 mu_y-1 offset_x offset_y);
% make kernel to do translation
shift_kernel = zeros(abs(offset_y * 2) + 1 abs(offset_x * 2) + 1);
shift_kernel(abs(offset_y) + 1 + offset_y abs(offset_x) + 1 + offset_x) = 1;
% shift both image and blur kernel
kshif
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
.CA.... 819464 2011-12-21 16:43 blinddeconv\1.png
.CA.... 14394572 2011-12-21 22:12 blinddeconv\Blind Deconvolution.pdf
.CA.... 988 2011-06-28 00:42 blinddeconv\center_kernel_separate.m
.CA.... 58373 2011-12-21 22:40 blinddeconv\deblur.jpg
.CA.... 3169 2011-05-26 09:49 blinddeconv\fast_deconv_bregman.m
.CA.... 59141 2011-05-26 03:09 blinddeconv\fishes.jpg
.CA.... 3957468 2011-05-26 03:09 blinddeconv\lyndsey.tif
.CA.... 5935 2011-12-21 22:46 blinddeconv\ms_blind_deconv.asv
.CA.... 5935 2011-12-21 22:46 blinddeconv\ms_blind_deconv.m
.CA.... 142355 2011-05-26 03:09 blinddeconv\mukta.jpg
.CA.... 448 2011-02-03 21:30 blinddeconv\pcg_kernel_core_irls_conv.m
.CA.... 2194 2011-05-26 09:54 blinddeconv\pcg_kernel_irls_conv.m
.CA.... 1489716 2011-05-26 03:09 blinddeconv\pietro.tif
.CA.... 725 2011-06-28 01:41 blinddeconv\README.txt
.CA.... 6072 2011-12-21 20:34 blinddeconv\solve_image_bregman.asv
.CA.... 6074 2011-01-30 03:04 blinddeconv\solve_image_bregman.m
.CA.... 3385 2011-06-28 00:49 blinddeconv\ss_blind_deconv.m
.CA.... 1903 2011-12-21 22:36 blinddeconv\test_blind_deconv.asv
.CA.... 1931 2011-12-21 22:37 blinddeconv\test_blind_deconv.m
.C.D... 0 2011-12-21 22:40 blinddeconv
----------- --------- ---------- ----- ----
20959848 20
评论
共有 条评论