Class LdSpectrogram3D
This class generates false-colour spectrograms of long duration audio recordings.
Important properties are:
- the colour map which maps three acoutic indices to RGB.
- The scale of the x and y axes which are dtermined by the sample rate, frame size etc.
In order to create false colour spectrograms, copy the method
public static void DrawFalseColourSpectrograms(LDSpectrogramConfig configuration)
All the arguments can be passed through a config file.
Create the config file throu an instance of the class LDSpectrogramConfig
and then call config.WritConfigToYAML(FileInfo path).
Then pass that path to the above static method.
Inheritance
LdSpectrogram3D
Assembly: AudioAnalysisTools.dll
public static class LdSpectrogram3D
Fields
|
Improve this Doc
View Source
Declaration
public const string KeyDayOfYear = "DayOfYear"
Field Value
|
Improve this Doc
View Source
Declaration
public const string KeyFreqBin = "FreqBin"
Field Value
|
Improve this Doc
View Source
Declaration
public const string KeyMinOfDay = "MinOfDay"
Field Value
|
Improve this Doc
View Source
Declaration
public const string KeyYear = "Year"
Field Value
|
Improve this Doc
View Source
Declaration
public const int TotalDaysInYear = 365
Field Value
|
Improve this Doc
View Source
Declaration
public const int TotalMinutesInDay = 1440
Field Value
Methods
|
Improve this Doc
View Source
Declaration
public static void AddDaylightMinutesToImage(Image<Rgb24> image, FileInfo sunriseSetData, int minuteOfDay)
Parameters
Type |
Name |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
image |
|
FileInfo |
sunriseSetData |
|
Int32 |
minuteOfDay |
|
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> DrawFreqScale_vertical(int yoffset, int trackHeight, int herzValue, int nyquistFreq)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> Frame3DSpectrogram(Image<Rgb24> image, string key, int value, int year, string colorMap, TimeSpan xInterval, int nyquistFreq, int unitValue, FileInfo sunriseSetData)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> FrameSliceOf3DSpectrogram_ConstantFreq(Image<Rgb24> bmp1, Image<Rgb24> titleBar, TimeSpan xInterval, int herzValue, FileInfo sunriseSetData, int nyquistFreq)
Parameters
Type |
Name |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
bmp1 |
|
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
titleBar |
|
TimeSpan |
xInterval |
|
Int32 |
herzValue |
|
FileInfo |
sunriseSetData |
|
Int32 |
nyquistFreq |
|
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> FrameSliceOf3DSpectrogram_ConstantMin(Image<Rgb24> bmp1, Image<Rgb24> titleBar, int nyquistFreq, int minuteOfDay, FileInfo sunriseSetData)
Parameters
Type |
Name |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
bmp1 |
|
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
titleBar |
|
Int32 |
nyquistFreq |
|
Int32 |
minuteOfDay |
|
FileInfo |
sunriseSetData |
|
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> FrameSliceOf3DSpectrogram_DayOfYear(Image<Rgb24> bmp1, Image<Rgb24> titleBar, int year, int dayOfYear, TimeSpan xInterval, int herzValue, FileInfo sunriseSetData, int nyquistFreq)
Parameters
Type |
Name |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
bmp1 |
|
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
titleBar |
|
Int32 |
year |
|
Int32 |
dayOfYear |
|
TimeSpan |
xInterval |
|
Int32 |
herzValue |
|
FileInfo |
sunriseSetData |
|
Int32 |
nyquistFreq |
|
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Declaration
public static List<string> GetDataSlice(DirectoryInfo dataTableDir, string key, int value)
Parameters
Returns
|
Improve this Doc
View Source
This method reads a single file containg a single day of index values.
The method assumes that the file name has following structure: XXXXX_YYYYMMDD.SpectralIndices.PivotTable.csv.
Declaration
public static List<string> GetDaySlice(DirectoryInfo dataTableDir, int year, int dayOfYear)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> GetImageSlice(string key, List<string> data, int rowId, int colId, int redId, int grnId, int bluId, IndexProperties ipRed, IndexProperties ipGrn, IndexProperties ipBlu, int freqBinCount)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Main(LdSpectrogram3D.Arguments)
This method used to construct slices out of implicit 3-D spectrograms.
As of December 2014 it contains hard coded variables just to get it working.
Declaration
public static void Main(LdSpectrogram3D.Arguments arguments)
Parameters
|
Improve this Doc
View Source
Declaration
public static double[, ] NormaliseSpectrogramMatrix(IndexProperties indexProperties, double[, ] matrix, double backgroundFilterCoeff)
Parameters
Returns