Search Results for

    Show / Hide Table of Contents

    Class FFT2D

    Performs two dimensional FFT on a matrix of values. IMPORTANT: The matrix passed to this class for performing of 2D FFT need not necessarily have width equal to height but both width and height MUST be a power of two.

    Inheritance
    Object
    FFT2D
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: AudioAnalysisTools.DSP
    Assembly: AudioAnalysisTools.dll
    Syntax
    public class FFT2D

    Methods

    | Improve this Doc View Source

    FFT2Dimensional(Double[,])

    Performs a 2D-Fourier transform on data in the passed Matrix/image.

    Declaration
    public static double[, ] FFT2Dimensional(double[, ] M)
    Parameters
    Type Name Description
    Double[,] M
    Returns
    Type Description
    Double[,]
    | Improve this Doc View Source

    FFT2DOutput2MatrixOfMagnitude(Double[], Int32[])

    First construct complex sampleData, then calculate the magnitude of sampleData.

    Declaration
    public static double[, ] FFT2DOutput2MatrixOfMagnitude(double[] sampleData, int[] dims)
    Parameters
    Type Name Description
    Double[] sampleData
    Int32[] dims
    Returns
    Type Description
    Double[,]
    | Improve this Doc View Source

    fftShift(Double[,])

    This method "shifts" (that is, "rearranges") the quadrants of the magnitude matrix generated by the 2DFourierTransform such that the Top Left quadrant is swapped with the Bottom-Right quadrant and the Top-Right quadrant is swapped with the Bottom-Left. This has the effect of shifting the low frequency coefficients into the centre of the matrix and the high frequency coefficients are shifted to the edge of the image.

    Declaration
    public static double[, ] fftShift(double[, ] matrix)
    Parameters
    Type Name Description
    Double[,] matrix
    Returns
    Type Description
    Double[,]
    | Improve this Doc View Source

    GetImageDataAsGrayIntensity(String, Boolean)

    reads an image into a matrix. Takes weighted average of the RGB colours in each pixel.

    Declaration
    public static double[, ] GetImageDataAsGrayIntensity(string imageFilePath, bool reversed)
    Parameters
    Type Name Description
    String imageFilePath
    Boolean reversed
    Returns
    Type Description
    Double[,]
    | Improve this Doc View Source

    Matrix2ComplexVector(Double[,])

    Concatenates the columns of the passed matrix and inserts zeros in every second position. The matrix is assumed to be an image and therefore read it using image coordinates. The output vector is now a vector of Complex numbers, with the imaginary part set to 0.

    Declaration
    public static Complex[] Matrix2ComplexVector(double[, ] M)
    Parameters
    Type Name Description
    Double[,] M

    The input matrix.

    Returns
    Type Description
    Complex[]

    A flattened M as a vactor.

    Remarks

    This method was created to replicate the functionality of Matrix2PaddedVector(Double[,]) to support a changed MathNet API.

    | Improve this Doc View Source

    Matrix2PaddedVector(Double[,])

    Concatenates the columns of the passed matrix and inserts zeros in every second position. The matrix is assumed to be an image and therefore read it using image coordinates. The output vector is now assumed to be a vector of Complex numbers, with the real values in the even positions and the imaginary numbers in the odd positions.

    Declaration
    public static double[] Matrix2PaddedVector(double[, ] M)
    Parameters
    Type Name Description
    Double[,] M
    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    TestFFT2D()

    METHOD to TEST the FFT2D.

    Declaration
    public static void TestFFT2D()

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top