Main class for live stream classification and visualisation. More...
#include <liveplayer.h>
Public Member Functions | |
LivePlayer (QWidget *parent=0) | |
Constructor. | |
void | useFeatures () |
Updates the view. | |
Public Member Functions inherited from FeatureDrawer | |
FeatureDrawer (bool live=false) | |
Constructor. | |
~FeatureDrawer () | |
Destructor. | |
void | drawSpectrum (bool draw=true) |
Set if the spectrum should be drawn. | |
virtual void | setNetwork (NeuralNetwork *net) |
Set a network that can be used to classify the samples. | |
void | setImageSize (int width, int height) |
Changes the size of the output. Redraws if needed. | |
void | draw (string name="", bool liveMode=false) |
Draws the features to an image. | |
void | writeToFile (string file) |
Save the drawn image to a file. | |
void | writeToDevice (QPaintDevice *device) |
Write the drawn image to a paint device. | |
Public Member Functions inherited from SoundAnalyser | |
SoundAnalyser (bool live=false) | |
Sets up a new sound analyser. | |
~SoundAnalyser () | |
Destructor. | |
void | resetExtractors () |
Extractors management. | |
void | cleanExtractors () |
Clean the data in the extractors. | |
void | registerExtractor (string name, FeatureExtractor *extr, bool used=true, bool drawLines=true) |
Adds a new extractor. | |
FeatureExtractor * | getExtractor (string name) |
Find an extractor. | |
bool | setupPipeline (string filename) |
Setup. | |
void | setNormalization (float min, float max) |
Set up unified bounds for all features. | |
bool | compute (string url) |
Compute the features of a given file. | |
void | waitComputed () |
Wait up to the end of the computation. | |
unsigned int | nbFeatures () |
Features management : sizes. | |
unsigned int | nbElems (unsigned int n) |
Return the number of elements of the nth feature. | |
unsigned int | nbSamples () |
Return the number of sample we've been computing. | |
unsigned int | dimension () |
Get the dimension : sum of all the nbElems(i) | |
unsigned int | realDimension () |
Get the real dimension : sum of all the nbElems we care (the values which are actually used for detection) | |
double ** | features (unsigned int n) |
Return the array of features for the nth sample. | |
void | clearFeatures () |
Clears the features. | |
void | cleanOldFeatures (unsigned int newestCount) |
Removes the old features so that the newest remain. | |
bool | isUsed (unsigned int index) |
Features management : individual properties. | |
bool | isDrawnWithLines (unsigned int index) |
Should this feature be drawn as a lines or a shade of grey ? | |
string | name (unsigned int n) |
Get the name of the nth feature. | |
int | getFeatureByName (string name) |
Get the id of the feature named so (-1 if not found) | |
void | useBuffer () |
Callbacks. | |
void | sequenceEnds () |
End the computation. | |
unsigned int | samplingFrequency () |
Mirrors. |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) |
Event handling function (redraws the scene) | |
void | keyReleaseEvent (QKeyEvent *event) |
Key handling (volume) |
Main class for live stream classification and visualisation.