Ideal Low-Pass Filtering of an Image

Ideal Low-Pass Filtering of an Image based on DFT
1,8K Descargas
Actualizado 15 may 2012

Ver licencia

function im = IdealLowPass(im0,fc)
% fc is the circular cutoff frequency which is normalized to [0 1], that is,
% the highest radian frequency \pi of digital signals is mapped to 1.

[ir,ic,iz] = size(im0);
hr = (ir-1)/2;
hc = (ic-1)/2;
[x, y] = meshgrid(-hc:hc, -hr:hr);

mg = sqrt((x/hc).^2 + (y/hr).^2);
lp = double(mg <= fc);

IM = fftshift(fft2(double(im0)));
IP = zeros(size(IM));
for z = 1:iz
IP(:,:,z) = IM(:,:,z) .* lp;
end
im = abs(ifft2(ifftshift(IP)));

Citar como

Xiangguo Li (2025). Ideal Low-Pass Filtering of an Image (https://www.mathworks.com/matlabcentral/fileexchange/36674-ideal-low-pass-filtering-of-an-image), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2009b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Etiquetas Añadir etiquetas
Agradecimientos

Inspirado por: Ideal Low Pass Filter

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

IdealLowPass/

Versión Publicado Notas de la versión
1.1.0.0

misunderstand the reply, and upload this twice, delete one, and update this.

1.0.0.0