F29H85x-SDK  1.03.00.00
 
AI - Feature Extract APIs

Introduction

This contains prototyping of user interactive API functions

Files

file  feature_extract.h
 Header file contains enumerations, structure definitions and functions declarations for Edge AI Feature Extract Module interface.
 

Data Structures

struct  feature_extraction
 Feature extraction context structure. More...
 

Functions

void FE_allocFeatureExtract (feature_extraction_handle fe)
 Calculates required memory allocation for feature extraction.
 
void FE_initFeatureExtract (feature_extraction_handle fe)
 Initializes feature extraction state and buffers.
 
void FE_runFeatureExtract (feature_extraction_handle fe)
 Main feature extraction processing function.
 
int FE_compareModelInput (model_input_t *expected_array, model_input_t *obtained_array)
 Compares feature extraction buffers.
 
int FE_compareModelOutput (model_output_t *expected_array, model_output_t *obtained_array)
 Compares nn model buffers.
 

Typedefs

typedef float model_input_t
 Model Input.
 
typedef float model_output_t
 Model Output.
 
typedef feature_extractionfeature_extraction_handle
 

Typedef Documentation

◆ model_input_t

typedef float model_input_t

Model Input.

Model Input type

◆ model_output_t

typedef float model_output_t

Model Output.

Model Output type

◆ feature_extraction_handle

Function Documentation

◆ FE_allocFeatureExtract()

void FE_allocFeatureExtract ( feature_extraction_handle fe)

Calculates required memory allocation for feature extraction.

Parameters
feFeature extraction handle

Sets the required memory size for feature extraction operations Size is calculated as 2x frame size in float precision

Returns
None

◆ FE_initFeatureExtract()

void FE_initFeatureExtract ( feature_extraction_handle fe)

Initializes feature extraction state and buffers.

Parameters
feFeature extraction handle

Initializes history buffer and output buffer for feature extraction Handles both normalized and quantized output modes Processes each channel separately for multi-channel data

Returns
None

◆ FE_runFeatureExtract()

void FE_runFeatureExtract ( feature_extraction_handle fe)

Main feature extraction processing function.

Parameters
feFeature extraction handle containing all buffers and state

Performs complete feature extraction pipeline including:

  • Raw signal processing (optional mean removal)
  • Windowing (optional)
  • FFT computation (optional)
  • FFT normalization (optional)
  • DC removal (optional)
  • Frequency binning (optional)
  • Log scaling (optional)
  • Frame concatenation (optional)
  • Batch normalization or direct copy (based on configuration)

Processes each channel independently and supports both normalized float output and quantized int8_t output modes

Returns
None

◆ FE_compareModelInput()

int FE_compareModelInput ( model_input_t * expected_array,
model_input_t * obtained_array )

Compares feature extraction buffers.

Parameters
expected_arrayExpected output from feature extraction
obtained_arrayObtained output from feature extraction

Takes the difference of the two arrays and returns the number of elements that were not matched.

Returns
number of mismatches in two array

◆ FE_compareModelOutput()

int FE_compareModelOutput ( model_output_t * expected_array,
model_output_t * obtained_array )

Compares nn model buffers.

Parameters
expected_arrayExpected output from nn model
obtained_arrayObtained output from nn model

Takes the difference of the two arrays and returns the number of elements that were not matched.

Returns
number of mismatches in two array