pyk4a icon indicating copy to clipboard operation
pyk4a copied to clipboard

Question about pyk4a.PyK4APlayback ()

Open xin4431 opened this issue 1 year ago • 2 comments

`def main():

k4a_playback = pyk4a.PyK4APlayback("C:/AppData/output.mkv")

k4a_playback.open()
cv2.namedWindow('Azure Kinect RGB', cv2.WINDOW_NORMAL)
while True:
    capture = k4a_playback.get_next_capture()

    if capture is not None:
        color_image = capture.color
        if color_image is not None:
            color_image_data = color_image.data
            color_image_data = np.array(color_image_data, copy=False)
            color_image_bgr = cv2.cvtColor(color_image_data, cv2.COLOR_BGRA2BGR)
            cv2.imshow('Azure Kinect RGB', color_image_bgr)

` That's my code。 The problem arises when, on the first frame, the color result in the capture object is None image On the second frame, the color results in the capture object are shown below image The final realistic image is shown below image Why is that? Ask for Help

xin4431 avatar Jul 21 '23 07:07 xin4431

Is it possible that the depth sync is off? So first frame has depth but no color?

lpasselin avatar Jul 21 '23 14:07 lpasselin

It's normal behavior. Very often first frame(s) missed color data. I think it can happens in middle of mkv too.

shagren avatar Jul 24 '23 10:07 shagren