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

Add APIs to get extrinsic/distortion matrix and timestamp, etc. #121

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

davidliyutong
Copy link

Timestamps are helpful for researchers of robotics

Changes:

  • [feature] add get_timestamp_usec method to capture
  • [feature] add get_device_timestamp_usec to capture
  • [feature] add get_system_timestamp_nsec to capture
  • [feature] add get_extrinsic_matrix to calibration for getting extrinsic matrix of cameras
  • [feature] add get_distortion_parameters for getting distortion parameters of cameras

…be very helpful for researchers of robotics

Changes:
- [feature] add `get_timestamp_usec` method to capture
- [feature] add `get_device_timestamp_usec` to capture
- [feature] add `get_system_timestamp_nsec` to capture
- [feature] add `get_extrinsic_matrix` to calibration for getting extrinsic matrix of cameras
- [feature] add `get_distortion_parameters` for getting distortion parameters of cameras
@davidliyutong
Copy link
Author

Here is an example to test:

import pykinect_azure as pykinect
pykinect.initialize_libraries()


def test_new_api(path: str):
    pb: pykinect.Playback = pykinect.start_playback(path)
    while True:
        ret, capture = pb.update()
        if ret:
            print("Extrinsic Matrix: ", capture.calibration.get_extrinsic_matrix())
            print("Distortion Matrix: ", capture.calibration.get_distortion_parameters())
            color_obj = capture.get_color_image_object()
            print("timestamp usec: ", color_obj.get_timestamp_usec())
            print("Device timestamp usec: ", color_obj.get_device_timestamp_usec())
            print("System timestamp nsec: ", color_obj.get_system_timestamp_nsec())
        else:
            break

test_new_api(r"recording.mkv")

refactor: get_extrinsic_matrix support camera parameter

refactor: get_distortion_parameters support camera parameter

feat: add create_custom16 / create_bgra32 api to support 16bit depth
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

Successfully merging this pull request may close these issues.

1 participant