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

6 次查看(过去 30 天)
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);

回答(1 个)

ali ibrahim
ali ibrahim 2015-12-7
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);

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by