public abstract class JAudioFeatureExtractor extends AudioProcessor implements FeatureExtractor<DoubleFV,SampleChunk>
Modifier and Type | Field and Description |
---|---|
protected jAudioFeatureExtractor.AudioFeatures.FeatureExtractor |
featureExtractor
The jaudio feature extractor
|
Constructor and Description |
---|
JAudioFeatureExtractor()
Default constructor for ad-hoc processing.
|
JAudioFeatureExtractor(AudioStream as)
Chainable constructor
|
Modifier and Type | Method and Description |
---|---|
DoubleFV |
extractFeature(SampleChunk sc)
Calculates the feature for each channel, then flattens the channel arrays
into a single
DoubleFV . |
abstract double[][] |
getExtraInputs(double[] samples,
double sampleRate)
Returns the extra inputs required by a specific feature extractor
|
double[][] |
getLastCalculatedFeature() |
double[][] |
process(double[][] samples,
double sampleRate)
Process the given sample data.
|
double[] |
process(double[] samples,
double sampleRate)
Process the given sample array for a single channel
|
SampleBuffer |
process(SampleBuffer sb)
Process the given sample buffer.
|
SampleChunk |
process(SampleChunk sample)
Function that takes a sample chunk and processes the chunk.
|
void |
setLastCalculatedFeature(double[][] lastCalculatedFeature) |
getLength, getUnderlyingStream, nextSampleChunk, process, processingComplete, reset, setUnderlyingStream
iterator, seek
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected jAudioFeatureExtractor.AudioFeatures.FeatureExtractor featureExtractor
public JAudioFeatureExtractor()
public JAudioFeatureExtractor(AudioStream as)
as
- The audio stream to chain to.public SampleBuffer process(SampleBuffer sb)
sb
- The sample bufferpublic double[][] process(double[][] samples, double sampleRate)
samples
- The samplessampleRate
- The sample rate of the datapublic double[] process(double[] samples, double sampleRate)
samples
- The samples for a single channelsampleRate
- The sample rate of the datapublic abstract double[][] getExtraInputs(double[] samples, double sampleRate)
samples
- The samples for a single channelsampleRate
- The sample rate of the datapublic SampleChunk process(SampleChunk sample) throws Exception
process
in class AudioProcessor
sample
- The sample chunk to process.Exception
- If the processing could not take placeAudioProcessor.process(org.openimaj.audio.SampleChunk)
public DoubleFV extractFeature(SampleChunk sc)
DoubleFV
.
Extract features from an object and return them.extractFeature
in interface FeatureExtractor<DoubleFV,SampleChunk>
sc
- the object to extract fromFeatureExtractor.extractFeature(java.lang.Object)
public double[][] getLastCalculatedFeature()
public void setLastCalculatedFeature(double[][] lastCalculatedFeature)
lastCalculatedFeature
- the lastCalculatedFeature to set