Class Dct1dFast

java.lang.Object
imagingbook.spectral.dct.Dct1dFast
All Implemented Interfaces:
Dct1d
Direct Known Subclasses:
Dct1dFast.Double, Dct1dFast.Float

public abstract class Dct1dFast extends Object

This is fast implementation of the DCT, based on the JTransforms package by Piotr Wendykier ( https://github.com/wendykierp/JTransforms). Note that this class has no public constructor - instantiate sub-class Dct1dFast.Float or Dct1dFast.Double instead, as shown below. See Sec. 20.1 of [1] for additional details.

Usage example (for float data):

 float[] data = {1, 2, 3, 4, 5, 3, 0};
 Dct1d.Float dct = new Dct1dFast.Float(data.length);
 dct.forward(data);
 dct.inverse(data);
 ...
 

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

  • Method Details

    • getSize

      public int getSize()
      Description copied from interface: Dct1d
      Returns the size of this DCT (length of data vectors).
      Specified by:
      getSize in interface Dct1d
      Returns:
      the size of this DCT