Re: "Max()" filter? [message #29709 is a reply to message #29574] |
Fri, 08 March 2002 09:19  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
"trouble" <the_cacc@hotmail.com> wrote in message
news:5f9f0a23.0203070323.4c32551b@posting.google.com...
> You could code this up quicker than it took to write the message...
trouble,
Certainly a brute-force method with loops that go over every array element
and do a Max operator over the appropriate nxn (or less) kernel is easy, but
I think that it is somewhat inefficient for the 1024x1024 datasets I have in
mind where the kernel might be around 30x30. In trying it, it runs in about
14 seconds.
Perhaps I should have added the word "efficient" somewhere, where I would
like performance on the same order as the Smooth function, which takes 0.151
seconds. I believe Smooth saves huge amounts of time by overlapping
calculations. I don't see how an efficient local max filter like this would
be trivial to write in IDL, that's why I was asking.
The builtin grayscale dilate I mentioned before works conveniently, but I
discover now that it's not really that fast, over 10 seconds in my little
test.
However, I'd really like to have it work (efficiently) with floating-point
values. Trying that now, I get results in over 18 seconds. Not bad, but not
great, so if you have something up your sleeve, please post away.
Regards,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|