Realsense remote recorder
Project description
RealsenseRecorder
A set of Python scripts to operate Intel Realsense Cameras. By using multi-thread techniques, this script can record color + depth from up to 4 Realsense Cameras (2 x L515 and 2 x D435)
Installation
From Source
git clone https://github.com/mvig-robotflow/rfimu-realsense-recorder
cd rfimu-realsense-recorder
python setup.py
From PyPi
python -m pip install markit-realsense-recorder
Usage
Script Usage
import io
import cv2
import numpy as np
import yaml
from realsense_recorder.common import new_realsense_camera_system_from_config, RealsenseSystemModel
cfg_str = """
realsense:
cameras:
- color:
- exposure: -1
format: rs.format.bgra8
fps: 30
height: 1080
width: 1920
depth: [] # Do not user depth
endpoint: {}
imu: []
product_id: 0B64 # 0B64 for L515
product_line: L500 # Currently supported models are L500(L515) and D400(D435)
ref: 1
sn: f0220485 # SN of target Camera, can get from RealSenseViewer
system:
base_dir: ./realsense_data
frame_queue_size: 100
interactive: false
interval_ms: 0
use_bag: false
"""
def main():
cfg = yaml.load(io.StringIO(cfg_str), yaml.SafeLoader)
sys = new_realsense_camera_system_from_config(RealsenseSystemModel, cfg['realsense'], None)
print(sys.cameras)
cam = sys.cameras[0]
cam.open()
cam.start()
mtx = np.array(cam.intrinsics_matrix)
while True:
color_image, depth_image, ts, sys_ts, frame_counter = cam.get_frames()
cv2.imshow("frame", color_image)
key = cv2.waitKey(1)
if key == 27:
print('esc break...')
cv2.destroyAllWindows()
break
main()
Command Line Usage
To Create and persist record configuration:
python -m realsense_recorder configure
To launch a remote record station that supports REST API
python -m realsense_recorder run --app=remote_record_seq
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for markit-realsense-recorder-1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a91595c535802340dd1e0668642cd4a70661c1a0199c6ada7dd92d096d500db9 |
|
MD5 | ca147356c6d9bef4bb177e7d7b1e2ce6 |
|
BLAKE2b-256 | 096ede68c9ccbeecb7383bcc92b12646a41f1c216553d6eda583c5df624ec051 |
Close
Hashes for markit_realsense_recorder-1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b95e343fb93f45f78b2c0a2f0d4e3e09fe57ccb4a543d69ea4ecc36da2ae4fd3 |
|
MD5 | ac947b90d1046a5f5c797499134840bc |
|
BLAKE2b-256 | fb023dcd3b001bcd9acd07115bf4b98ab84aa7913d8ffa1cb7d1dc9e099f7783 |