Commit d6f7025f authored by Alexander Krause's avatar Alexander Krause

improved robustness

parent 9ca31f20
......@@ -122,8 +122,8 @@ namespace ExplorVizGestureControl
Body body = bodies[i];
// Only process the first tracked body
if (body.IsTracked && isFirstTrackedBody(body, i))
{
if (body.IsTracked && IsFirstTrackedBody(body, i) && NoClippedEdges(body))
{
filter.UpdateFilter(body);
CameraSpacePoint[] filteredJoints = filter.GetFilteredJoints();
Vector3D[] accumulatedJoints = jointAccumulator.accumulateJoints(filteredJoints);
......@@ -152,7 +152,16 @@ namespace ExplorVizGestureControl
#region Helper
private bool isFirstTrackedBody(Body body, int index)
private bool NoClippedEdges(Body body)
{
FrameEdges clippedEdges = body.ClippedEdges;
return clippedEdges.HasFlag(FrameEdges.Top) ||
clippedEdges.HasFlag(FrameEdges.Left) ||
clippedEdges.HasFlag(FrameEdges.Right) ? false : true;
}
private bool IsFirstTrackedBody(Body body, int index)
{
if (bodyTrackingID == 0)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment