-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreprocess.h
More file actions
69 lines (55 loc) · 1.42 KB
/
Copy pathpreprocess.h
File metadata and controls
69 lines (55 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
* @file preprocess.h
* @brief Pre-processing module header
* @version 1.0.0
* @license MIT
*/
#ifndef PREPROCESS_H
#define PREPROCESS_H
#include "edgeplug_runtime.h"
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Initialize pre-processing module
*/
edgeplug_status_t preprocess_init(uint32_t window_size);
/**
* @brief Add sensor data to window buffer
*/
edgeplug_status_t preprocess_add_sample(const edgeplug_sensor_data_t* sensor_data);
/**
* @brief Normalize window data to int8 range
*/
edgeplug_status_t preprocess_normalize_window(int8_t* normalized_data, size_t* data_size);
/**
* @brief Apply windowing function to data
*/
edgeplug_status_t preprocess_apply_window(float* windowed_data, size_t data_size);
/**
* @brief Get window statistics
*/
edgeplug_status_t preprocess_get_stats(float* mean, float* std_dev, float* min_val, float* max_val);
/**
* @brief Set normalization parameters
*/
edgeplug_status_t preprocess_set_normalization(float v_mean, float v_std,
float c_mean, float c_std);
/**
* @brief Set filter parameters
*/
edgeplug_status_t preprocess_set_filter(float alpha);
/**
* @brief Check if window is ready for processing
*/
bool preprocess_is_window_ready(void);
/**
* @brief Reset window buffer
*/
edgeplug_status_t preprocess_reset(void);
#ifdef __cplusplus
}
#endif
#endif /* PREPROCESS_H */