I am trying to send POST requests to a server based on gestures (hand tracking example) recognized through the landmark points. I saw that the landmark points are available in most calculators but transferring them to the java layer (specifically MainActivity.java) seems tricky. Any suggestions would be great!
Try to revise calculator itself sending out vector
Then adding PacketCallback like this to get the data from graph
At least this works for me on my own face calculator graph
processor.getGraph().addPacketCallback("output_vector", new PacketCallback() {
@Override
public void process(Packet packet) {
float[] dest = PacketGetter.getFloat32Vector(packet);
// Do something with the landmark point
}
});
@lcycoding how to add "output_vector" in graph? would you please share more detail? thx very much!!!
I do know how to get face detector result too...
@liyuming1978 in your node.cc
How about just adding outputs in GetContract()
if (cc->Outputs().HasTag("OUT_VEC")) {
cc->Outputs().Tag("OUT_VEC").Set<std::vector<float>>();
}
And in process()
cc->Outputs().Tag("OUT_VEC").Add(output_vecs.release(),
cc->InputTimestamp());
The other part is pure c code part, just code it...
@lcycoding thx so much! that works, simple and rough.:)
@lcycoding thx so much! that works, simple and rough.:)
Have you implemented it? Can you share how do access the landmark points in the java layer?
Most helpful comment