java.lang.Object
imagingbook.spectral.dft.Dft2dFast
- All Implemented Interfaces:
Dft2d
- Direct Known Subclasses:
Dft2dFast.Double,Dft2dFast.Float
Fast implementation of the 2-dimensional DFT using 1D FFTs. Note that this
class has no public constructor - instantiate sub-class
Dft2dDirect.Float or Dft2dDirect.Double instead, as shown
below. See Ch. 19 of [1] for additional details.
Usage example (for float data):
float[][] re = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {-2, -1, 0}};
float[][] im = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
int w = re.length; // w = 4
int h = re[0].length; // h = 3
Dft2d.Float dft = new Dft2dFast.Float(w, h);
dct.forward(re, im); // re/im now is the 2D DFT spectrum
dct.inverse(re, im); // re/im now is the original 2D signal
...
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTwo-dimensional DFT implementation usingdoubledata.static classTwo-dimensional DFT implementation usingfloatdata. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the 'height' of the 2D data array (length of dimension 1).Returns the scaling mode of this DFT (seeScalingMode).intgetWidth()Returns the 'width' of the 2D data array (length of dimension 0).
-
Method Details
-
getWidth
public int getWidth()Description copied from interface:Dft2dReturns the 'width' of the 2D data array (length of dimension 0). Data arrays are indexed asdata[x][y], with 0 ≤ x < width and 0 ≤ y < height. -
getHeight
public int getHeight()Description copied from interface:Dft2dReturns the 'height' of the 2D data array (length of dimension 1). Data arrays are indexed asdata[x][y], with 0 ≤ x < width and 0 ≤ y < height. -
getScalingMode
Description copied from interface:Dft2dReturns the scaling mode of this DFT (seeScalingMode).- Specified by:
getScalingModein interfaceDft2d- Returns:
- the scaling mode of this DFT.
-