function [output]=NLmeansfilter(input,t,f,h)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% input: image to be filtered
% t: radio of search window 5 5*5大小的搜索窗
% f: radio of similarity window 2
% h: degree of filtering 10
%
% Author: Jose Vicente Manjon Herrera & Antoni Buades
% Date: 09-03-2006
%
% Implementation of the Non local filter proposed for A. Buades, B. Coll and J.M. Morel in
% "A non-local algorithm for image denoising"
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Size of the image
[m n]=size(input);
% Memory for the output
Output=zeros(m,n);
% Replicate the boundaries of the input image
input2 = padarray(input,[f f],'symmetric');
% Used kernel
kernel = make_kernel(f);
kernel = kernel / sum(sum(kernel));
h=h*h;
for i=1:m
for j=1:n
i1 = i+ f;
j1 = j+
图像Non-local means 去噪算法matlab实现
最新推荐文章于 2025-04-23 15:08:07 发布