java.lang.Object
imagingbook.spectral.dft.Dft1dDirect
- All Implemented Interfaces:
Dft1d
- Direct Known Subclasses:
Dft1dDirect.Double
,Dft1dDirect.Float
Direct (slow) implementation of the 1-dimensional DFT using tabulated sine
and cosine values. Note that this class has no public constructor -
instantiate sub-class Dft1dDirect.Float
or Dft1dDirect.Double
instead, as shown below. See Sec. 18.4.1 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 Dft1dDirect.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).
- Version:
- 2022/10/23
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
One-dimensional DFT implementation usingdouble
data.static class
One-dimensional DFT 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.
-