Hello,
Motion gesture and Hand Posture are 2 different solutions. That's why it's not the same API to get the outputs.
Yes, it is possible to merge both solutions. It has been done internally in ST for some demos and it will come in the coming months on st.com. (Motion Gesture + Hand Posture + Smart Presence Detection)
This is something you can do on your side, and I can try to give you few hints:
- both solutions are using the same VL53L8CX driver (ULD), that makes the merge easier
- you can use the "motion gesture" C project to start and add Hand Posture files inside
- add Network_Init(&App_Config) after gesture_library_init_configure();
- after getting the ranging data, you can call the hand posture functions:
App_Config.RangingData = RangingData;
/* Pre-process data */
Network_Preprocess(&App_Config);
/* Run inference */
Network_Inference(&App_Config);
/* Post-process data */
Network_Postprocess(&App_Config);
Then, you will have to merge both outputs, for example you can have this kind of code:
//Write the AI output in the Gesture structure for the GUI EVK
if (evk_label_table[(int)(App_Config.AI_Data.handposture_label)] != 0) {
gest_predictor.gesture.ready = 1;
gest_predictor.gesture.label = evk_label_table[(int)(App_Config.AI_Data.handposture_label)];
}
else{
gest_predictor.gesture.ready = 0;
gest_predictor.gesture.label = 0;
hold_timer = sensor_data.timestamp_ms;
}
That's just some hints, I hope it will help you.
Yann