6!:2 'med3 =: 3 medianf p19'
17.9526
   6!:2 'med13 =: 13 medianf p19'
47.2474
   $p19
3072 4608

(A median 3x3 median filter on a 3072x4608 image takes 18s, and a 13x13 median 
takes 47s).

This is on an Intel Core 2 Duo CPU at 2.00GHz , using the median function from 
the already-mentioned book of Cliff Reiter "Fractals, Visualization and J":

   medianf =: 1 : '(2#m) "_ (<.-:*:m)&{@:(/:~)@,;._3 ]'

I have a C program doing the same in 0.7s resp. 1.2s, but when I consider how 
much time it took me to write that one, I must compute an awful lot of medians 
with it before earning back that time.

Ben
________________________________________
From: [email protected] [[email protected]] on 
behalf of Sarah Arnold [[email protected]]
Sent: Wednesday, April 24, 2013 15:02
To: [email protected]
Subject: Re: [Jchat] J for Image Processing

Hi
I should have been a bit more precise: I'm into astronomy. I'm mostly
interested in noise reduction / signal enhancement and therefore apply
different filters to the image. Some of this operations, like for
example the MedianFilter[] function, take a lot of computation time.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to