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

Home » Public Forums » archive » negative return values after FFT
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: negative return values after FFT [message #49530 is a reply to message #49458] Fri, 28 July 2006 12:52 Go to previous messageGo to previous message
adisn123 is currently offline  adisn123
Messages: 44
Registered: July 2006
Member
Thanks. It makes sense more now.


kuyper@wizard.net wrote:
> adisn123@yahoo.com wrote:
>> The returned (inversely fourier transformed) values are in a complex
>> number format, but
>> I realized that those imaginary parts are very small, almost close to
>> zero with ~10^-8 floating
>> point.
>
> OK, that's a normal consequence of the fact that all floating point
> mathematics have a certain inherent inaccuracy. Values that
> mathematically should be exactly 0 come out numerically as "almost" 0;
> it's unfortunately unavoidable. In that case extracting the real
> component and ignoring the imaginary components is the appropriate
> solution.
>
> ...
>> I have another question related to the returned values.
>>
>> How do I interpret the "negative" spacial pixel values after inverse
>> FFT?
>
> If your unfiltered image frequently goes close to zero, filtiering it
> is likely to cause it to sometimes go negative. That's because each
> component in the frequency domain represents a function in the spatial
> domain that oscilates between positive and negative values. No matter
> how you change the value of a frequency component, either by increasing
> it or by decreasing it, you'll be increasing the image in some
> locations, and decreasing it somewhere else. If you're unlucky enough,
> the places where it decreases the image brightness might be places
> where the brightness is already so low that the changes made by the
> filter make it go negative.
>
> If you're sure your filter implements what you want it to implement,
> I'd recommend treating the negative pixels as zeros. However, if you
> ever decide to rebin the data to a lower resolution, use the original
> values, including the negatives - don't replace the negative values
> with zeros until after re-binning, because otherwise you'll be creating
> a systematic bias, making the darkest parts of your image slightly
> brighter than they should be.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: kernel convolution?
Next Topic: doubt in IDL Smooth in 2D with NaN values and /edge

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

Current Time: Sat Oct 11 03:06:52 PDT 2025

Total time taken to generate the page: 0.63778 seconds