Mohadese Emarloo
Mohadese Emarloo

Reputation: 1

pykinect2 can not recognise a body with python

I am using kinect xbox1 and python and lib. I am trying to run the lib and collect skeleton model data. When I write a simple code to just check if it can tarck a body or not it prints nothing.

import ctypes
import pygame
from pykinect2 import PyKinectV2, PyKinectRuntime


def get_3d_joint_data(kinect):
    
    if kinect.has_new_body_frame():
        print('hi')
        bodies = kinect.get_last_body_frame()
        
        joint_data = []
        
        if bodies is not None:
            for body in bodies:
                
                print('YEEEEEEEEEEES')
                               
kinect = PyKinectRuntime.PyKinectRuntime(127)
while True:
    get_3d_joint_data(kinect)

I am expecting to print hi when I am infront of the sensor but it prints nothing. I tried with different distances. The sensor is working properly on sdk

Upvotes: 0

Views: 38

Answers (0)

Related Questions