|
|
@ -1,7 +1,7 @@ |
|
|
|
#include "a8k_opt_algo.hpp"
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#ifdef BUILD_IN_QT
|
|
|
|
void zos_log(const char* fmt, ...); |
|
|
|
|
|
|
|
#define ZLOGI(fmt, ...) zos_log("INFO " fmt "\n", ##__VA_ARGS__);
|
|
|
@ -9,6 +9,14 @@ void zos_log(const char* fmt, ...); |
|
|
|
#define ZLOGE(fmt, ...) zos_log("ERRO " fmt "\n", ##__VA_ARGS__);
|
|
|
|
#define ZLOGW(fmt, ...) zos_log("WARN " fmt "\n", ##__VA_ARGS__);
|
|
|
|
|
|
|
|
#else
|
|
|
|
#define ZLOGI(fmt, ...) ;
|
|
|
|
#define ZLOGD(fmt, ...) ;
|
|
|
|
#define ZLOGE(fmt, ...) ;
|
|
|
|
#define ZLOGW(fmt, ...) ;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace a8k_opt_algo { |
|
|
|
using namespace std; |
|
|
|
|
|
|
@ -302,6 +310,7 @@ void a8k_opt_algo_process(vector<float>& ogigin_val, OptAlgoResult& result) { |
|
|
|
vector<float> subsample = sub_sampling(super, 24); |
|
|
|
ZLOGI("subsample size:%d", subsample.size()); |
|
|
|
|
|
|
|
result.input = ogigin_val; |
|
|
|
m_cxt.raw = subsample; |
|
|
|
m_cxt.avg = subsample; |
|
|
|
m_cxt.diff = least_square_method_differentiate(m_cxt.avg, 5); // 最小二乘法求曲线斜率集合
|
|
|
|