Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about pyk4a.PyK4APlayback () #213

Open
xin4431 opened this issue Jul 21, 2023 · 2 comments
Open

Question about pyk4a.PyK4APlayback () #213

xin4431 opened this issue Jul 21, 2023 · 2 comments

Comments

@xin4431
Copy link

xin4431 commented Jul 21, 2023

`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

@lpasselin
Copy link
Collaborator

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

@shagren
Copy link
Contributor

shagren commented Jul 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants