Filter löschen
Filter löschen

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

6 Ansichten (letzte 30 Tage)
Ali
Ali am 7 Nov. 2015
Beantwortet: ali ibrahim am 7 Dez. 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);

Antworten (1)

ali ibrahim
ali ibrahim am 7 Dez. 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);

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by