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实现
本文详细介绍了如何使用Matlab实现Non-local means算法进行图像去噪。通过对比分析,展示了该算法在去除图像噪声方面的能力,并提供了具体的代码实现步骤。
摘要由CSDN通过智能技术生成