help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mean filter, another implementation


From: Søren Hauberg
Subject: Re: mean filter, another implementation
Date: Sun, 24 Jul 2005 16:48:19 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050404)

Hi Everybody,
First I wanted to say thanks for all you help. I've implementing a fast mean filtering in C++, and wanted to give you some results (the function names are the ones that was given in previous mails, and mymeanfilter is my implementation in C++):

data = rand(1, 10^7);
n = 100;
f = ones(1,n)/n;

tic; mymeanfilter(data,n); toc   ans = 2.9098
tic; meanfilter(data,n); toc     ans = 14.860
tic; rec_mean1(data,n); toc      ans = 12.704
tic; rec_mean2(data,n); toc      ans = 4.4931
tic; rec_mean3(data,n); toc      ans = 11.573
tic; conv(data, f); toc          ans = 10.463

So the solution (rec_mean2) by Andreas Naessl was quite good, only a little bit slower than the C++ implementation.

Thanks Everybody,
Søren

P.S. If anybody wants my code, you can get it at
http://hauberg.org/share/files/meanfilter.cc



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]