Class LdSpectrogramRibbons
Inheritance
LdSpectrogramRibbons
Assembly: AudioAnalysisTools.dll
public static class LdSpectrogramRibbons
Fields
|
Improve this Doc
View Source
Declaration
public const int RibbonPlotHeight = 32
Field Value
|
Improve this Doc
View Source
Declaration
public const string SpectralRibbonTag = ".SpectralRibbon"
Field Value
Methods
|
Improve this Doc
View Source
Declaration
public static double[] CalculateDecayedSpectralIndices(double[] spectralIndices, int distanceInMeters, double halfLife)
Parameters
Type |
Name |
Description |
Double[] |
spectralIndices |
|
Int32 |
distanceInMeters |
|
Double |
halfLife |
|
Returns
|
Improve this Doc
View Source
returns a Long Duration spectrogram of same image length as the full-scale LdSpectrogram but the frequency scale reduced to the passed vlaue of height.
This produces a LD spectrogram "ribbon" which can be used in circumstances where the full image is not appropriate.
Note that if the height passed is a power of 2, then the full frequency scale (also a power of 2 due to FFT) can be scaled down exactly.
A height of 32 is quite good - small but still discriminates frequency bands.
Declaration
public static Image<Rgb24> GetSpectrogramRibbon(double[, ] indices1, double[, ] indices2, double[, ] indices3)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Returns an array of summary indices, where each element of the array (one element per minute) is a single summary index
derived by averaging the spectral indices for that minute.
The returned matrices have spectrogram orientation.
Declaration
public static double[] GetSummaryIndexArray(double[, ] m)
Parameters
Type |
Name |
Description |
Double[,] |
m |
|
Returns
|
Improve this Doc
View Source
Declaration
public static Image GetSummaryIndexRibbon(double[] indices1, double[] indices2, double[] indices3)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image |
|
|
Improve this Doc
View Source
Declaration
public static Image GetSummaryIndexRibbonWeighted(double[, ] indices1, double[, ] indices2, double[, ] indices3)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image |
|
|
Improve this Doc
View Source
Read in a false colour spectrogram ribbon and recover the normalised indices from the pixel values.
Declaration
public static List<double[, ]> ReadSpectralIndicesFromFalseColourSpectrogram(Image<Rgb24> image, int startMinute, int endMinute)
Parameters
Type |
Name |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
image |
a false colour spectrogram ribbon.
|
Int32 |
startMinute |
start reading from this row.
|
Int32 |
endMinute |
end reading from this row.
|
Returns
Type |
Description |
List<Double[,]> |
an array of three index matrices, from red, green, blue components of each pixel.
|
|
Improve this Doc
View Source
Reads the entire length of spectral ribbon images into a matrix of spectral indices.
IMPORTANT: Assume that the two images both have the same time scale, that is, one pixel = one minute AND
ASSUME they have the same pixel width i.e. span the same number of minutes.
Declaration
public static double[, ] ReadSpectralIndicesFromTwoFalseColourSpectrogramRibbons(Image image1, Image image2)
Parameters
Type |
Name |
Description |
SixLabors.ImageSharp.Image |
image1 |
spectrogram ribbon 1.
|
SixLabors.ImageSharp.Image |
image2 |
spectrogram ribbon 2.
|
Returns
Type |
Description |
Double[,] |
matrix of normalised spectral indices corresponding to those used to construct the ribbon images.
|
|
Improve this Doc
View Source
This method assumes that the ribbon spectrograms are composed using the following five indices for RGB
string[] colourKeys1 = { "ACI", "ENT", "EVN" };.
string[] colourKeys2 = { "BGN", "PMN", "EVN" };.
Declaration
public static double[, ] ReadSpectralIndicesFromTwoFalseColourSpectrogramRibbons(Image image1, Image image2, TimeSpan startTime, TimeSpan duration)
Parameters
Type |
Name |
Description |
SixLabors.ImageSharp.Image |
image1 |
|
SixLabors.ImageSharp.Image |
image2 |
|
TimeSpan |
startTime |
|
TimeSpan |
duration |
|
Returns