工具/软件:
大家好、我正在将跌倒检测算法直接集成到 IWR6843AOP MSS 工程中。 我已经查看了fall_detection.py源代码并将其转换为如下所示的 C 实现。 下面列出了我的查询:
1.请查看下面的代码并分享您的反馈?
2.是否需要将雷达的其他参数(如垂直速度)包含在故障检测逻辑中?
3、设备的每次安装都需要校准吗? 还是在配置文件本身中进行处理?
#define FALL_THRESHOLD_SCALING 0.6f
#define FALL_HISTORY_seconds 2.5f
第50章
第64章,我是你的女人
#define HEIGHY_HISTORY_SIZE ((int)(FALL_HISTORY_seconds * 1000/FRAME_PERIOD_MS))
typedef 结构{
Float heightHistory[height_history_size];
uint16_t historyIndex;
bool fallDetected;
} TrackerFallInfo;
TrackerFallInfo* runFallDetection (Pcount3DDemo_MSS_MCB* gMmwMssMCB)
{
tracker Proc_Target DescrHandle* targetDescr =&gMmwMssMCB->tracker 输出;
Bool Current = targetDescr->currentDescr;
tracker Proc_Target * TList = targetDescr->TList[当前];
tracker Proc_Target Index* tIndex= targetDescr->tIndex[当前];
对于(uint8_t i = 0;i < gMmwMssMCB->numTargets;i++){
uint8_t idx = tIndex[i];
tracker Proc_Target * t =&TList[idx];
uint32_t id = t->tid;
if (id >= MAX_TRACKed_objects)
继续;
TrackerFallInfo* info =&trackerFallInfos[id];
float* buffer = info->heightHistory;
uint16_t hidx = info->historyIndex;
浮点数当前高度= t->posZ;
//float velocityZ = t->velZ;
Buffer[hidx]= currentHeight;
info->historyIndex =(hidx + 1)% height_history_size;
float oldestHeight = buffer[info->historyIndex];
Bool SuddenDrop =(oldestHeight > 0.0f)&&
(currentHeight <(fall_threshold_register * oldestHeight));
info->fallDetected = SuddHrop;
}
返回 trackerFallInfos;
}