Interface DiscreteFourierTransform<I extends ImageBase<I>,T extends ImageBase>

All Known Implementing Classes:
GeneralFft_to_DiscreteFourierTransform_F32, GeneralFft_to_DiscreteFourierTransform_F64

public interface DiscreteFourierTransform<I extends ImageBase<I>,T extends ImageBase>

High level interface for applying the forward and inverse Discrete Fourier Transform to an image. Images of any size can be processed by this interface. Images can typically be processed must faster when their size is a power of two, see Fast Fourier Transform. The size of the input image can also be changed between called.

The Fourier transform of an image contains both real an imaginary components. These are stored in the output image in an interleaved format. As a result the output image will have twice the width and height as the input image. This format is shown below:

 a[i*2*width+2*j] = Re[i][j],
 a[i*2*width+2*j+1] = Im[i][j], 0≤i<height, 0≤j<width
 

INPUT MODIFICATION: By default none of the inputs are modified. However, in some implementations, memory can be saved by allowing inputs to be modified. To allow the class to modify its inputs use the following function, setModifyInputs(boolean).

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    forward(I image, T transform)
    Applies forward transform to the input image.
    void
    inverse(T transform, I image)
    Applies the inverse transform to a fourier transformed image to recover the original image
    boolean
    Returns state of forward modification flag
    void
    setModifyInputs(boolean modify)
    This function can toggle the internal implementations ability to modify the input image or input transform.
  • Method Details

    • forward

      void forward(I image, T transform)
      Applies forward transform to the input image.
      Parameters:
      image - (Input) Input image. Default: Not modified.
      transform - (Output) Fourier transform, twice width and same height of input. Modified.
    • inverse

      void inverse(T transform, I image)
      Applies the inverse transform to a fourier transformed image to recover the original image
      Parameters:
      transform - (Input) Fourier transform. twice width and same height of output. Default: Not modified.
      image - (Output) reconstructed image. Modified.
    • setModifyInputs

      void setModifyInputs(boolean modify)
      This function can toggle the internal implementations ability to modify the input image or input transform.
      Parameters:
      modify - true for the input can be modified and false for it will not be modified.
    • isModifyInputs

      boolean isModifyInputs()
      Returns state of forward modification flag
      Returns:
      true for the input can be modified and false for it will not be modified.