java.lang.Object
imagingbook.spectral.dft.Dft1dFast
- All Implemented Interfaces:
Dft1d
- Direct Known Subclasses:
Dft1dFast.Double
,Dft1dFast.Float
FFT (fast) implementation of the DFT, based on the JTransforms package by
Piotr Wendykier (see
https://github.com/wendykierp/JTransforms). Note that this class has no
public constructor - instantiate sub-class Dft1dFast.Float
or
Dft1dFast.Double
instead, as shown below. See Sec. 18.4.2 of [1] for
additional details.
Usage example (for float
data):
float[] re = {1, 2, 3, 4, 5, 3, 0}; float[] im = {0, 0, 0, 0, 0, 0, 0}; Dft1d.Float dft = new Dft1dFast.Float(re.length); dct.forward(re, im); // re/im now is the DFT spectrum dct.inverse(re, im); // re/im now is the original signal ...
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
One-dimensional FFT implementation usingdouble
data.static class
One-dimensional FFT implementation usingfloat
data. -
Method Summary
Modifier and TypeMethodDescriptionReturns the scaling mode of this DFT (seeScalingMode
).int
getSize()
Returns the size of this DFT (length of data vectors).
-
Method Details
-
getSize
public int getSize()Description copied from interface:Dft1d
Returns the size of this DFT (length of data vectors). -
getScalingMode
Description copied from interface:Dft1d
Returns the scaling mode of this DFT (seeScalingMode
).- Specified by:
getScalingMode
in interfaceDft1d
- Returns:
- the scaling mode of this DFT.
-