at.tuwien.ifs.feature.extraction.audio
Class FeatureExtractor

java.lang.Object
  extended by at.tuwien.ifs.feature.extraction.audio.FeatureExtractor

public class FeatureExtractor
extends java.lang.Object

Copyright Vienna University of Technology

Version:
$Id: FeatureExtractor.java 167 2010-06-17 10:12:01Z frank $
Author:
Thomas Lidy

Field Summary
private  boolean DEBUG
           
private static int N_STATISTICAL_DESCRIPTORS
           
private  int sampleRate
           
private  int sampleSizeInBits
           
 
Constructor Summary
FeatureExtractor(int sampleRate, int sampleSizeInBits)
           
 
Method Summary
private  RealMatrixExt computeRhythmHistogram(RealMatrixExt rhythmPattern)
           
private  RealMatrixExt computeStatisticalSpectrumDescriptor(org.apache.commons.math.linear.RealMatrix sonogram, int bandLimit)
           
 RealMatrixExt[] extractFeatureSets(short[] wavesegment, FeatureExtractionOptions opt)
           
 RealMatrixExt[] extractFeatureSets(short[] waveSegment, FeatureExtractionOptions opt, int fftWindowSize)
           
private  double[] getStatisticalSpectrumDescriptor(double[] dataRow)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private boolean DEBUG

sampleRate

private int sampleRate

sampleSizeInBits

private int sampleSizeInBits

N_STATISTICAL_DESCRIPTORS

private static int N_STATISTICAL_DESCRIPTORS
Constructor Detail

FeatureExtractor

public FeatureExtractor(int sampleRate,
                        int sampleSizeInBits)
Parameters:
sampleRate - the sample rate
sampleSizeInBits - the sample size in bits
Method Detail

extractFeatureSets

public RealMatrixExt[] extractFeatureSets(short[] wavesegment,
                                          FeatureExtractionOptions opt)
Parameters:
wavesegment - audio data
opt - Feature Extraction Options fftWindowSize size of window for FFT calculation will be determined from sampleRate
Returns:
RealMatrixExt array containing one RealMatrixExt for each feature set extracted

extractFeatureSets

public RealMatrixExt[] extractFeatureSets(short[] waveSegment,
                                          FeatureExtractionOptions opt,
                                          int fftWindowSize)
Parameters:
waveSegment - audio data
opt - Feature Extraction Options
fftWindowSize - size of window for FFT calculation
Returns:
RealMatrixExt array containing one RealMatrixExt for each feature set extracted

computeRhythmHistogram

private RealMatrixExt computeRhythmHistogram(RealMatrixExt rhythmPattern)

computeStatisticalSpectrumDescriptor

private RealMatrixExt computeStatisticalSpectrumDescriptor(org.apache.commons.math.linear.RealMatrix sonogram,
                                                           int bandLimit)

getStatisticalSpectrumDescriptor

private double[] getStatisticalSpectrumDescriptor(double[] dataRow)