extern "C" EI_IMPULSE_ERROR run_classifier(
signal_t *signal,
ei_impulse_result_t *result,
bool debug = false);
Brief: Run the classifier over a raw features array.
Blocking: yes
Description: run_classifier() accepts a signal_t input pointing to a callback that reads in pages of raw features. The features must be in a flat, 1-dimensional array. run_classifier() performs any necessary preprocessing on the raw features (e.g. DSP, cropping of images, etc.) before performing inference. Results from inference are stored in an ei_impulse_result_t struct.
  • signal - [input] Pointer to a signal_t struct that contains the total length of the raw feature array, which must match EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE, and a pointer to a callback that reads in the raw features.
  • result - [output] Pointer to an ei_impulse_result_t struct that will contain the various output results from inference after run_classifier() returns.
  • debug - [input] Print internal preprocessing and inference debugging information via ei_printf().
Returns: Error code as defined by EI_IMPULSE_ERROR enum. Will be EI_IMPULSE_OK if inference completed successfully.