comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » "Max()" filter?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
"Max()" filter? [message #29581] Wed, 06 March 2002 10:30 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi all,

Given these well-known filters for 2D array 'x':

Smooth(x, n)
Median(x, n)
Convol(x, [nxn kernel])

All of them calculate for each element in x (in general) some function of an
nxn set of elements around that element. For the three, the function is

Mean()
Median()
WeightedSum()

I'd like a filter that uses the Max() function, so that this array:

1 4 2 4 3
3 5 2 1 4
5 7 4 3 1
3 5 1 1 2
3 1 2 3 1

filtered with width 3 gives:

5 5 5 4 4
7 7 7 4 4
7 7 7 4 4
7 7 7 4 3
5 5 5 3 3

(I think! :-)

Even better would be to supply any function in general. Is there a name for
this? Is there any free IDL code for this out there? :-) Google tells me
that something called "local max filter" was discussed here once, but that's
not really what I want.

Many thanks for any leads.

Cheers,
--
-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
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Catching I/O errors on RESTORE
Next Topic: CALL_EXTERNAL and memory allocation

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 07:18:34 PDT 2025

Total time taken to generate the page: 0.88483 seconds