Class PatchSampling
Inheritance
PatchSampling
Assembly: AudioAnalysisTools.dll
public static class PatchSampling
Methods
|
Improve this Doc
View Source
Adding a row of zero/one to 2D array.
Declaration
public static double[, ] AddRow(double[, ] matrix)
Parameters
Type |
Name |
Description |
Double[,] |
matrix |
|
Returns
|
Improve this Doc
View Source
construct the original matrix from a list of sequential patches
all vectors in list are of the same length.
Declaration
public static double[, ] ConcatenateGridOfPatches(List<double[, ]> list, int columnSize, int patchWidth, int patchHeight)
Parameters
Returns
|
Improve this Doc
View Source
concatenate submatrices column-wise into one matrix, i.e., the number of rows for the output matrix
is equal to the number of rows of each of the frequency band matrices.
Declaration
public static double[, ] ConcatFreqBandMatrices(List<double[, ]> submatrices)
Parameters
Returns
|
Improve this Doc
View Source
converts a set of patches to a matrix of original size after applying pca.
the assumption here is that the input matrix is a sequential non-overlapping patches.
Declaration
public static double[, ] ConvertPatches(double[, ] whitenedPatches, int patchWidth, int patchHeight, int columnSize)
Parameters
Returns
|
Improve this Doc
View Source
outputs a matrix with arbitrary minimum and maximum frequency bins.
Declaration
public static double[, ] GetArbitraryFreqBandMatrix(double[, ] matrix, int minFreqBin, int maxFreqBin)
Parameters
Returns
|
Improve this Doc
View Source
converts a spectrogram matrix to submatrices by dividing the column of input matrix to
different freq bands with equal size. Output submatrices have same number of rows and same number
of columns. numberOfBands as an input parameter indicates how many output bands are needed.
Declaration
public static List<double[, ]> GetFreqBandMatrices(double[, ] matrix, int numberOfBands)
Parameters
Type |
Name |
Description |
Double[,] |
matrix |
|
Int32 |
numberOfBands |
|
Returns
|
Improve this Doc
View Source
Declaration
public static double[][] GetPatches(double[, ] spectrogram, int patchWidth, int patchHeight, int numberOfPatches, PatchSampling.SamplingMethod samplingMethod)
Parameters
Returns
|
Improve this Doc
View Source
cut audio to subsegments of desired length.
return list of subsegments.
Declaration
public static List<AudioRecording> GetSubsegmentsSamples(AudioRecording recording, double subsegmentDurationInSeconds, double frameStep)
Parameters
Returns
|
Improve this Doc
View Source
convert a list of patch matrices to one matrix by row
patch matrices can have different row numbers but must have the same column number.
Declaration
public static double[, ] ListOf2DArrayToOne2DArray(List<double[, ]> listOfPatchMatrices)
Parameters
Type |
Name |
Description |
List<Double[,]> |
listOfPatchMatrices |
|
Returns