I am trying to use PyKinect2 module to get the depth frames from a Kinect v2 device. I've followed the examples provided here. I am able to see the depth frames, but they appear in the PyGame window truncated, although the size of the frame is 512x424 as it should be.
I use the get_last_depth_frame()
method provided by PyKinect2 and draw it on the surface with the following code.
def draw_depth_frame(self, frame, target_surface):
target_surface.lock()
address = self._kinect.surface_as_array(target_surface.get_buffer())
ctypes.memmove(address, frame.ctypes.data, frame.size)
del address
target_surface.unlock()