I'm trying to extract landmarks from Hand Detection graph while modifying demo_run_graph_main.cc.
To do so, i modified hand_tracking_desktop_live.pbtxt adding following line:
output_stream: "landmarks"
I did that because in node HandLandmarkTrackingCpu there is an output with the same name. Next, I registered output stream in demo_run_graph_main.cc and tried to extract a packet from it:
ASSIGN_OR_RETURN(mediapipe::OutputStreamPoller pollerLandmarks,
graph.AddOutputStreamPoller("landmarks"));
...
...
LOG(INFO) << "Getting landmarks...";
mediapipe::Packet packetLandmarks;
if (!pollerLandmarks.Next(&packetLandmarks)) {
LOG(INFO) << "ERROR";
}
LOG(INFO) << "Got landmarks!";
And that's all! Code freezes on .Next call, it doesn't output "ERROR" nor "Got landmarks!" messages. I'm quite confused, as I have no idea what to try next. If I comment out my changes and leave code as it was, it works fine.
Maybe there is some material on C++ Mediapipe API?