Effacer les filtres
Effacer les filtres

How to use H=lpfilter​('gaussian​',M,N,sigm​a); filter in frequency domain

6 vues (au cours des 30 derniers jours)
Ali
Ali le 7 Nov 2015
I used the following codes : [M,N]=size(f); H=lpfilter('gaussian',M,N,sig); where f is the image and sig=10. I have downloaded the lpfilter.m but it gives the following error.
Undefined function 'dftuv' for input arguments of type 'double'.
Error in lpfilter (line 10) [U,V] = dftuv(M,N);

Réponses (1)

ali ibrahim
ali ibrahim le 7 Déc 2015
miss function dftuv:
function [U, V] = dftuv(M, N)
%DFTUV Computes meshgrid frequency matrices.
% [U, V] = DFTUV(M, N) computes meshgrid frequency matrices U and
% V. U and V are useful for computing frequency-domain filter
% functions that can be used with DFTFILT. U and V are both
% M-by-N.
% Copyright 2002-2004 R. C. Gonzalez, R. E. Woods, & S. L. Eddins % Digital Image Processing Using MATLAB, Prentice-Hall, 2004 % $Revision: 1.3 $ $Date: 2003/04/16 22:30:34 $
% Set up range of variables. u = 0:(M - 1); v = 0:(N - 1);
% Compute the indices for use in meshgrid. idx = find(u > M/2); u(idx) = u(idx) - M; idy = find(v > N/2); v(idy) = v(idy) - N;
% Compute the meshgrid arrays. [V, U] = meshgrid(v, u);

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by