Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.51 KB

README.md

File metadata and controls

40 lines (32 loc) · 1.51 KB

py_rgbd_grabber

Simple python 3 utility to grab and save frames (asynchronously) from RGB-D sensors used for research.

Currently support two rgbd sensors: - Kinect2 - Realsense

Grab/Save Example

    # instantiate Kinect2 or Realsense
    sensor = Kinect2()
    # instantiate the recorder
    recorder = VideoRecorder(save_path, fps, width, height)
    # Inside the with statement, launch/release the async processes
    with sensor, recorder:
        # Get the list of frames grabbed (empty list if there is no new frames)
        frames = sensor.get_frames()
        # Or pop the last frame (will block until next frame)
        frame = sensor.pop_frame()
        # Send image to recorder
        recorder.save_frame(frame.rgb)

Frame contains an rgb numpy array [H, W, C], depth (mm) numpy array [H, W] and timestamp (s)

Kinect2 dependencies

Realsense dependencies

TODO

  • Recorder process could be based on a listener principle to have different recorder on the same process
  • Kinect2: implement function to get intrinsics from the driver

Contribution

Write an issue or send a pull request!