Search Results for

    Show / Hide Table of Contents

    Class NoiseProfile

    contains info re noise profile of an entire spectrogram.

    Inheritance
    Object
    NoiseProfile
    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 NoiseProfile

    Properties

    | Improve this Doc View Source

    MaxDb

    Declaration
    public double[] MaxDb { get; set; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    MinDb

    Declaration
    public double[] MinDb { get; set; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    NoiseMean

    Declaration
    public double[] NoiseMean { get; set; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    NoiseMedian

    Declaration
    public double[] NoiseMedian { get; set; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    NoiseMode

    Declaration
    public double[] NoiseMode { get; set; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    NoiseSd

    Declaration
    public double[] NoiseSd { get; set; }
    Property Value
    Type Description
    Double[]
    | Improve this Doc View Source

    NoiseThresholds

    Declaration
    public double[] NoiseThresholds { get; set; }
    Property Value
    Type Description
    Double[]

    Methods

    | Improve this Doc View Source

    CalculateBackgroundNoise(Double[,])

    (1) MODAL METHOD Calculates the modal background noise for each freqeuncy bin. Return the smoothed modal profile. Set the default zero value for number of SDs.

    Declaration
    public static double[] CalculateBackgroundNoise(double[, ] spectrogram)
    Parameters
    Type Name Description
    Double[,] spectrogram

    Assumes the passed spectrogram is oriented as: rows=frames, cols=freq bins.

    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    CalculateMeanNoiseProfile(Double[,])

    (1) MEAN SUBTRACTION Assumes the passed matrix is a spectrogram. i.e. rows=frames, cols=freq bins. Returns the noise profile over freq bins. i.e. one noise value per freq bin. Note that NoiseThresholds array is identical to NoiseMedian array.

    Declaration
    public static NoiseProfile CalculateMeanNoiseProfile(double[, ] matrix)
    Parameters
    Type Name Description
    Double[,] matrix

    the spectrogram with origin top-left.

    Returns
    Type Description
    NoiseProfile
    | Improve this Doc View Source

    CalculateMedianNoiseProfile(Double[,])

    (1) MEDIAN SUBTRACTION Assumes the passed matrix is a spectrogram. i.e. rows=frames, cols=freq bins. Returns the noise profile over freq bins. i.e. one noise value per freq bin. Note that NoiseThresholds array is identical to NoiseMedian array.

    Declaration
    public static NoiseProfile CalculateMedianNoiseProfile(double[, ] matrix)
    Parameters
    Type Name Description
    Double[,] matrix

    the spectrogram with origin top-left.

    Returns
    Type Description
    NoiseProfile
    | Improve this Doc View Source

    CalculateModalNoiseProfile(Double[,], Double)

    (1) MODAL METHOD Assumes the passed matrix is a spectrogram. i.e. rows=frames, cols=freq bins. Returns the noise profile over freq bins. i.e. one noise value per freq bin.

    Declaration
    public static NoiseProfile CalculateModalNoiseProfile(double[, ] matrix, double sdCount)
    Parameters
    Type Name Description
    Double[,] matrix

    the spectrogram with origin top-left.

    Double sdCount

    number of standard deviations.

    Returns
    Type Description
    NoiseProfile
    | Improve this Doc View Source

    CalculateModalNoiseUsingStartFrames(Double[,], Int32)

    (4) FIRST N FRAMES IMPORTANT: this method assumes that the first N frames (N=frameCount) DO NOT contain signal.

    Declaration
    public static double[] CalculateModalNoiseUsingStartFrames(double[, ] matrix, int firstNFramesCount)
    Parameters
    Type Name Description
    Double[,] matrix

    the spectrogram rotated with origin is top-left.

    Int32 firstNFramesCount

    the first N rows of the spectrogram.

    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    CalculatePercentileNoiseProfile(Double[,], Int32)

    Declaration
    public static NoiseProfile CalculatePercentileNoiseProfile(double[, ] matrix, int percentile)
    Parameters
    Type Name Description
    Double[,] matrix
    Int32 percentile
    Returns
    Type Description
    NoiseProfile
    | Improve this Doc View Source

    GetNoiseProfile_BinWiseFromLowestPercentileCells(Double[,], Int32)

    (3) BIN-WISE LOWEST PERCENTILE CELLS METHOD Assumes the passed matrix is a spectrogram. Returns the noise profile over freq bins. i.e. one noise value per freq bin. IMPORTANT: This is the preferred method to estiamte a noise profile for short recordings i.e LT approx 10-15 seconds long.

    Declaration
    public static double[] GetNoiseProfile_BinWiseFromLowestPercentileCells(double[, ] matrix, int lowPercentile)
    Parameters
    Type Name Description
    Double[,] matrix

    the spectrogram whose rows=frames, cols=freq bins.

    Int32 lowPercentile

    The percent of lowest energy frames to be included in calculation of the noise profile.

    Returns
    Type Description
    Double[]
    | Improve this Doc View Source

    GetNoiseProfile_fromLowestPercentileFrames(Double[,], Int32)

    (2) LOWEST PERCENTILE FRAMES METHOD Assumes the passed matrix is a spectrogram and that all values in the data matrix are positive. Returns the noise profile over freq bins. i.e. one noise value per freq bin. First calculate the frame averages, sort in ascending order and accumulate the first N% of frames. WARNING: This method should NOT be used for short recordings i.e LT approx 10-15 seconds long.

    Declaration
    public static double[] GetNoiseProfile_fromLowestPercentileFrames(double[, ] matrix, int lowPercentile)
    Parameters
    Type Name Description
    Double[,] matrix

    the spectrogram whose rows=frames, cols=freq bins.

    Int32 lowPercentile

    The percent of lowest energy frames to be included in calculation of the noise profile.

    Returns
    Type Description
    Double[]

    Returns a noise profile consisting of averaged values from the selected X% of low energy frames.

    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
    • Properties
      • MaxDb
      • MinDb
      • NoiseMean
      • NoiseMedian
      • NoiseMode
      • NoiseSd
      • NoiseThresholds
    • Methods
      • CalculateBackgroundNoise(Double[,])
      • CalculateMeanNoiseProfile(Double[,])
      • CalculateMedianNoiseProfile(Double[,])
      • CalculateModalNoiseProfile(Double[,], Double)
      • CalculateModalNoiseUsingStartFrames(Double[,], Int32)
      • CalculatePercentileNoiseProfile(Double[,], Int32)
      • GetNoiseProfile_BinWiseFromLowestPercentileCells(Double[,], Int32)
      • GetNoiseProfile_fromLowestPercentileFrames(Double[,], Int32)
    • Extension Methods
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top