Skip to content
Simple python 3 utility to grab and save frames from RGB-D sensors used for research. (Kinect2, Realsense)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
py_rgbd_grabber
tests
.gitignore
LICENSE
README.md
setup.py

README.md

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!

You can’t perform that action at this time.