其他分享
首页 > 其他分享> > 傅里叶变换之低通滤波

傅里叶变换之低通滤波

作者:互联网

  滤波是傅里叶变换的一个主要应用,因为在频域中可以更好的理解图像以及了解如何对它进行处理。

以下是低通滤波的matlab实现:

function output = low_filter(image,value)
%Retain centred transform components inside circle of radius
%
%  Usage: new image = low_filter(image,number)
%
%  Parameters: image      - array of points 
%              value      - radius of filter

%get dimensions
[rows,cols]=size(image); 

%filter the transform
for x = 1:cols %address all columns
  for y = 1:rows %address all rows
    if (((y-(rows/2))^2)+((x-(cols/2))^2)-(value^2))>0 
        output(y,x)=0; %discard components outside the circle
    else
        output(y,x)=image(y,x); %and keep the ones inside
    end
  end
end

  

标签:rows,end,image,之低,value,cols,filter,傅里叶,通滤波
来源: https://www.cnblogs.com/qianyuesheng/p/15003119.html