支持反向的上报,首先,再model.txt里面类别设置为!mouse等(在类别前面加一个英文的感叹号,表示非),然后yolov5正常上报,数字(比如,现在上报的是0个),rk1808-tool在收到消息之后,会查看前面是否有感叹号,如果有,表示在个数为0的时候,持续10秒钟,就上报;否则,就是在个数不为0,且持续10秒钟之后上报。

This commit is contained in:
2025-09-25 16:15:54 +08:00
parent 0f97f588ab
commit a5f477647f
6 changed files with 34 additions and 4 deletions
+11
View File
@@ -94,9 +94,20 @@ void convert_a_frame(MppFrame frame)
// lock acquired, should create thread and use pose_body
if (!should_do_judge_according_time()) {
if (inited_after_out_of_time_gap == 0) {
inited_after_out_of_time_gap = 1;
for (int i = 0; i < OBJ_CLASS_MAX; i++) {
pre_change_objects[i] = -1;
pre_change_frames[i] = 0;
}
}
pthread_mutex_unlock(&frame_mutex);
free(out);
return;
} else {
if (inited_after_out_of_time_gap == 1) {
inited_after_out_of_time_gap = 0;
}
}
pthread_t pose_body_handler;
pthread_create(&pose_body_handler, NULL, pose_body_thread, (void *)out);