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

Home » Public Forums » archive » Re: filtering problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: filtering problem [message #22495 is a reply to message #22494] Fri, 17 November 2000 00:00 Go to previous message
Margaret Journey is currently offline  Margaret Journey
Messages: 3
Registered: November 2000
Junior Member
This should do the trick.
Allan Wienecke
Visual Numerics, Inc.
Celebrating 30 Years as an Independent Software Vendor

; a is the array
; n is the kernel size
; t is the threshold

function dave, a, n, t

m = a gt t
k = replicate( 1.0, n, n )

return, a * avg(a) * convol(m,k) / (convol(m*a,k)+1e-30)

end


Dave Brennan wrote:

> Hi,
>
> i don't know if anyone can help but it's worth a try!
>
> I am trying to filter an array say (256x256) with a window of size 65x65
> which scans across the array pixel by pixel. It should compare the
> statistics of the area within the kernal with the global statistics of
> the image to produce a correction image. (This is a particular type of
> inhomogeneity correction)
>
> In detail: 'the algorithm should correct the pixel value by a
> multiplicative factor found by dividing the global mean by the window
> mean'
> A further problem is I want the ability to set a threshold where data
> below the threshold are not included in the statistics and not corrected
> by the algorithm.
>
> At first I though I could just use convol to produce a correction map
> but this does not allow me to set a threshold.
>
> Does anyone have any ideas? It needs to be as fast as possible as it
> will work on 128 images at a time.
>
> Cheers
>
> Dave Brennan
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: More fun
Next Topic: Re: How to display image on X root window?

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

Current Time: Fri Oct 10 15:36:35 PDT 2025

Total time taken to generate the page: 0.79964 seconds