Class ZoomTiledSpectrograms
Inheritance
ZoomTiledSpectrograms
Assembly: AudioAnalysisTools.dll
public static class ZoomTiledSpectrograms
Methods
|
Improve this Doc
View Source
THis method is a way of getting the acoustic index data at 0.2 second resolution to have some influence on the
frame spectrograms at 0.02s resolution.
We cannot assume that the two matrices will have the same number of columns i.e. same temporal duration.
The frame data has been padded to one minute duration. But the last index matrix will probably NOT be the full one
minute duration.
Therefore assume that indexData matrix will be shorter and take its column count.
Declaration
public static void CombineFrameDataWithIndexData(double[, ] frameData, double[, ] indexData, double frameWt, double indexWt)
Parameters
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> DrawFrameSpectrogramAtScale(LdSpectrogramConfig config, SpectrogramZoomingConfig zoomingConfig, TimeSpan startTimeOfData, TimeSpan frameScale, double[, ] frameData, IndexGenerationData indexGeneration, ImageChrome chromeOption)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Declaration
public static Image<Rgb24> DrawOneScaledIndexSpectrogramTile(LdSpectrogramConfig config, IndexGenerationData indexGenerationData, Dictionary<string, IndexProperties> indexProperties, TimeSpan startTime, TimeSpan dataScale, TimeSpan imageScale, int superTileImageWidth, Dictionary<string, double[, ]> spectra, string basename, ImageChrome chromeOption)
Parameters
Returns
Type |
Description |
SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgb24> |
|
|
Improve this Doc
View Source
Draws FC index spectrograms for an entire row.
Declaration
public static TimeOffsetSingleLayerSuperTile[] DrawSuperTilesAtScaleFromIndexSpectrograms(LdSpectrogramConfig analysisConfig, Dictionary<string, IndexProperties> indexProperties, SpectrogramZoomingConfig zoomingConfig, TimeSpan imageScale, Dictionary<string, double[, ]> spectra, IndexGenerationData indexGeneration, string basename, ImageChrome chromeOption, TimeSpan alignmentPadding)
Parameters
Returns
|
Improve this Doc
View Source
Assume that we are processing data for one minute only.
From this one minute of data, we produce images at three scales.
A one minute recording framed at 20ms should yield 3000 frames.
But to achieve this where sr= 22050 and frameSize=512, we need an overlap of 71 samples.
Consequently only 2999 frames returned per minute.
Therefore have to pad end to get 3000 frames.
Declaration
public static TimeOffsetSingleLayerSuperTile[] DrawSuperTilesFromSingleFrameSpectrogram(DirectoryInfo dataDir, LdSpectrogramConfig analysisConfig, Dictionary<string, IndexProperties> indexProperties, SpectrogramZoomingConfig zoomingConfig, int minute, double[] imageScales, string basename, IndexGenerationData indexGeneration, ImageChrome chromeOption, TimeSpan alignmentPadding)
Parameters
Returns
|
Improve this Doc
View Source
THIS IS ENTRY METHOD FOR TILING SPECTROGRAMS.
Declaration
public static void DrawTiles(AnalysisIoInputDirectory io, ZoomParameters common, string analysisTag)
Parameters
|
Improve this Doc
View Source
Declaration
public static DateTimeOffset GetPreviousTileBoundary(int tileWidth, double scale, DateTimeOffset recordingStartDate)
Parameters
Returns
|
Improve this Doc
View Source
THis method pads the end of a list of frames read from a csv file.
The frame count will be one less than expected for the recording segment because of frame overlap
Therefore pad the end of the list of frames with the last frame.
Declaration
public static void PadEndOfListOfFrames(List<double[]> frameList, int expectedFrameCount)
Parameters
|
Improve this Doc
View Source
THis method trims the end of a list of frames read from a csv file.
Sometimes inaccuracies in cutting audio produced frame counts that are too long.
Therefore too many columns are rendered. Simply remove the end frames and issue a warning.
TODO: a better solution would be to interpolate the extra frames... but too hard at the moment.
Declaration
public static void TrimEndOfListOfFrames(List<double[]> frameList, int expectedFrameCount)
Parameters