Prashant-Jonny / accord

Automatically exported from code.google.com/p/accord
0 stars 0 forks source link

HilbertTransform #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1.
method 
    public static void FHT(double[] data, FourierTransform.Direction direction)
    in class HilbertTransform
produces different results with another method:
        public static void FHT(Complex[] data, FourierTransform.Direction direction)    
--------------
2.
public static void FHT(Complex[] data, FourierTransform.Direction direction)
method produces the correct result, but using in HilbertTransform algo the 
wrong sequence call:
    FourierTransform.FFT(cdata, FourierTransform.Direction.Backward);
    FourierTransform.FFT(cdata, FourierTransform.Direction.Forward);

There is in HilbertTransform algo mast be Forward fft, then Backward.
--------------
3.
there is an inverse\different procedure call FourierTransform.Direction:
in public static void FHT(double[] data, FourierTransform.Direction direction)
    ...
    FourierTransform.FFT(cdata, FourierTransform.Direction.Forward);
    ...
    FourierTransform.FFT(cdata, FourierTransform.Direction.Backward);
then in public static void FHT(Complex[] data, FourierTransform.Direction 
direction)
    ...
    FourierTransform.FFT(cdata, FourierTransform.Direction.Backward);
    ...
    FourierTransform.FFT(cdata, FourierTransform.Direction.Forward);
--------------
imho
mess\difference is incorrect implementation of fft in AForge.
I used to check ALGLIB Free Edition: http://www.alglib.net/
,and my simple DFT imlementation.

Original issue reported on code.google.com by WouldYo...@gmail.com on 9 Aug 2013 at 12:50

GoogleCodeExporter commented 9 years ago
Thanks. As you correctly stated, this might be due the AForge.NET 
implementation. However, as far as results are concerned, it does not seems to 
be strictly incorrect, but different. This seems to be related to 

http://www.aforgenet.com/forum/viewtopic.php?f=2&t=1418 and
https://code.google.com/p/aforge/issues/detail?id=100

Original comment by cesarso...@gmail.com on 13 Aug 2013 at 11:41