Skip to content

vlt.image.powerSpectrum2D

  POWERSPECTRUM2D - Computes and analyzes the 2D power spectrum of an image.

    RESULTS = vlt.image.powerSpectrum2D(IMAGE, Name, Value, ...)

    Analyzes the spatial periodicity and orientation of patterns in a 2D image
    by computing its 2D Power Spectral Density (PSD). This method is ideal for
    quantifying repeating, non-circular patterns (like stripes or Turing patterns).

    The function returns a structure with quantitative results and generates two
    summary figures.

    Inputs:
      IMAGE          - A 2D matrix (e.g., an image) of double-precision values.

    Name-Value Pairs:
      'mm_per_pixel' - The physical size of a pixel in millimeters. Used for
                       scaling the frequency axes. (Default: 1)
      'angle_step'   - The step size in degrees for computing directional
                       profiles of the power spectrum. (Default: 10)
      'mask'         - A logical matrix of the same size as IMAGE. Pixels
                       where the mask is `false` are excluded from the analysis.

    Outputs:
      RESULTS - A structure containing the analysis results:
        .psd_2d              - The 2D Power Spectral Density image.
        .spatial_freq_radial - Frequency axis for the radial average (cycles/mm).
        .psd_radial_avg      - The 1D radially averaged power spectrum.
        .peak_spatial_freq   - The dominant spatial frequency in the image (cycles/mm).
        .peak_orientation    - The dominant orientation of the pattern in degrees.
        .angles              - Angles used for the directional profiles (degrees).
        .directional_profiles- A cell array of the 1D power profiles for each angle.
        .directional_dist_ax - The distance axis for the directional profiles.