Open davidliyutong opened 4 months ago
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")
Timestamps are helpful for researchers of robotics
Changes:
get_timestamp_usec
method to captureget_device_timestamp_usec
to captureget_system_timestamp_nsec
to captureget_extrinsic_matrix
to calibration for getting extrinsic matrix of camerasget_distortion_parameters
for getting distortion parameters of cameras