If you are in the situation in which you have the original image ( or an image which is very close to the original - for example in successive frames of a video) than you can use this function to get a good estimate of the blur kernel much faster than working with the blurry image only.
there is a simple demo that should work out of the box .
let me know if there is any problems with this :)
%purpose:
% estimate quickly and effectively the kernel that was used to blur img_orig
% into img_blurred.
% method:
% This function treats the kernel as the solution to an over-constrained
% problem. In other words :
% 1) blurred image = original image ** blur kernel ; where ** = convolution
% 2) hence for each pixel:
% blurred image(i,j) = original image( neighborhood(i,j) .* blur kernel)
% 3) a set of equations (2) can be set for different i,j's to solve for
% the blur kernel.
% 4) there are many many more equations than needed to solve for the blur
% kernel
% A variation of the ransac algorithm is implemented in order to
% find a good estimate of the blur kernel.
kind regards,
dan
引用格式
Dan (2024). calculate blur kernel from original and blurry images (https://www.mathworks.com/matlabcentral/fileexchange/54944-calculate-blur-kernel-from-original-and-blurry-images), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- Image Processing and Computer Vision > Image Processing Toolbox > Image Filtering and Enhancement > Deblurring >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!getKernel_orig2blurred/
getKernel_orig2blurred/Fortunato_Oliveira_FD_Script_our_method_only/our_method/
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0 | small big fix
|
|