Class GDiscreteFourierTransformOps

java.lang.Object
boofcv.alg.transform.fft.GDiscreteFourierTransformOps

public class GDiscreteFourierTransformOps extends Object
Implementation of functions in DiscreteFourierTransformOps which are image type agnostic
  • Constructor Details

    • GDiscreteFourierTransformOps

      public GDiscreteFourierTransformOps()
  • Method Details

    • createTransform

      public static <T extends GrayF<T>, W extends ImageInterleaved> DiscreteFourierTransform<T,W> createTransform(ImageDataType type)
      Creates a DiscreteFourierTransform for the specified type.
      Parameters:
      type - Image data type
      Returns:
      DiscreteFourierTransform
      See Also:
    • shiftZeroFrequency

      public static void shiftZeroFrequency(ImageInterleaved transform, boolean forward)
      Moves the zero-frequency component into the image center (width/2,height/2). This function can be called to undo the transform.
      Parameters:
      transform - the DFT which is to be shifted.
      forward - If true then it does the shift in the forward direction. If false then it undoes the transforms.
    • magnitude

      public static void magnitude(ImageInterleaved transform, GrayF magnitude)
      Computes the magnitude of the complex image:
      magnitude = sqrt( real2 + imaginary2 )
      Parameters:
      transform - (Input) Complex interleaved image
      magnitude - (Output) Magnitude of image
    • phase

      public static void phase(ImageInterleaved transform, GrayF phase)
      Computes the phase of the complex image:
      phase = atan2( imaginary , real )
      Parameters:
      transform - (Input) Complex interleaved image
      phase - (output) Phase of image
    • realToComplex

      public static void realToComplex(GrayF real, ImageInterleaved complex)
      Converts a regular image into a complex interleaved image with the imaginary component set to zero.
      Parameters:
      real - (Input) Regular image.
      complex - (Output) Equivalent complex image.
    • multiplyRealComplex

      public static void multiplyRealComplex(GrayF realA, ImageInterleaved complexB, ImageInterleaved complexC)
      Performs element-wise complex multiplication between a real image and a complex image.
      Parameters:
      realA - (Input) Regular image
      complexB - (Input) Complex image
      complexC - (Output) Complex image
    • multiplyComplex

      public static void multiplyComplex(ImageInterleaved complexA, ImageInterleaved complexB, ImageInterleaved complexC)
      Performs element-wise complex multiplication between two complex images.
      Parameters:
      complexA - (Input) Complex image
      complexB - (Input) Complex image
      complexC - (Output) Complex image