MediaPipeUnityPlugin
MediaPipeUnityPlugin copied to clipboard
How to extract the data from eventArgs.value in HolisticTrackingSolution
Plugin Version or Commit ID
v0.11.0
Unity Version
2021.3.18f1
Your Host OS
Windows10
Target Platform
Windows Standalone
Description
I need Face, Pose and Hands normalized landmark data. Please tell me how to extract those data from eventArgs.value in HolisticTrackingSolution?
Code to Reproduce the issue
No response
Additional Context
No response
im looking for the same think
@Ishihara-Masabumi . Have you tried something like this? you'll need a different one for each type of output. the example below handles output of type OutputEventArgs<NormalizedLandmarkList> eventArgs
public Vector4[] LandmarksToVector4(NormalizedLandmarkList nll) // where nll = eventArgs.value of LandmarkDetection output
{
var landmarks = nll.Landmark;
var vectorpoints = new Vector4[landmarks.Count];
for (int i = 0; i < landmarks.Count; i++)
{
var landmark = landmarks[i];
vectorpoints[i] = new Vector4(landmark.X, landmark.Y, landmark.Z, landmark.Visibility);
}
return vectorpoints;
}