From: Luna Moon on 5 Jul 2010 12:16 Hi all, I figured out a trick that I can do moving average fast - via "filter" function. But how do I do moving median fast, using the "filter" function format? I.e., the filter function filters a whole array column-wise.
From: us on 5 Jul 2010 12:25 Luna Moon <lunamoonmoon(a)gmail.com> wrote in message <a5f47c43-b694-4eed-9c88-4f5852608692(a)c33g2000yqm.googlegroups.com>... > Hi all, > > I figured out a trick that I can do moving average fast - via "filter" > function. > > But how do I do moving median fast, using the "filter" function > format? > > I.e., the filter function filters a whole array column-wise. this is somewhat circular... what ...exactly... do you want to know(?)... us
From: ImageAnalyst on 5 Jul 2010 12:30 Luna Moon You can do it with the nlfilter() function but you have to write your own median filter function. But what's wrong with medfilt1() and medfilt2()? You think you can do better than those? It may be possible for very large data sets that have a certain shape to their distribution (where the median can be analytically determined), but why bother? What kind of speed are you getting and what kind of speed do you need? Have you done a web search? http://www.bing.com/search?q=fast+median+filter&go=&form=QBLH&qs=n&sk=
From: Luna Moon on 5 Jul 2010 12:33 On Jul 5, 12:30 pm, ImageAnalyst <imageanal...(a)mailinator.com> wrote: > Luna Moon > You can do it with the nlfilter() function but you have to write your > own median filter function. But what's wrong with medfilt1() and > medfilt2()? You think you can do better than those? It may be > possible for very large data sets that have a certain shape to their > distribution (where the median can be analytically determined), but > why bother? What kind of speed are you getting and what kind of speed > do you need? > > Have you done a web search?http://www.bing.com/search?q=fast+median+filter&go=&form=QBLH&qs=n&sk= wow, you guys cought me. The problem was that I didn't know the existence of "medfilt1"... Now problem solved. thank you!
From: ImageAnalyst on 5 Jul 2010 12:38 If you type in "median" into the help, medfilt1() shows up as the third entry. The help facility can be a useful tool.
|
Next
|
Last
Pages: 1 2 Prev: squareform memory issue Next: How do I do recursive rolling average and variance fast? |