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

Home » Public Forums » archive » Re: Selective Convolution
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Selective Convolution [message #71669] Wed, 14 July 2010 06:13
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Jul 13, 2:32 pm, James <donje...@gmail.com> wrote:

> My first thought was setting the empty space to NaN values, but the
> NaN keyword to CONVOL does the opposite of what I want - it replaces
> NaN values with the convolution of real values, and ignores NaN values
> in the convolution of "good" elements.  I don't ever want to replace a
> NaN value with a convolved value, but I would like to treat NaN values
> as zeroes when calculating the convolution of "good" elements.
>
> So, I'm thinking I might have to write a C routine for selective
> convolution.  Any other ideas for how to overcome this?

Presumably you know where the NaN values are in the input array. So
can't you just set these values back to NaN after the
convolution? Convol will still perform (unnecessary)
calculations for invalid pixels that are surrounded by at least one
valid pixel within the kernel area. But it won't perform any
calculations for invalid pixels that are completely surrounded by
invalid pixels. If 90% of your pixels are invalid, then this might
still save you CPU time.

--Wayne
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: SMI/HDF format?
Next Topic: Re: PRINTF printing to wrong LUN

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

Current Time: Wed Oct 08 15:49:19 PDT 2025

Total time taken to generate the page: 0.00504 seconds