Name | realsense-recorder JSON |
Version |
1.4
JSON |
| download |
home_page | |
Summary | Realsense remote recorder |
upload_time | 2023-01-13 07:39:18 |
maintainer | |
docs_url | None |
author | davidliyutong |
requires_python | >=3.6 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
```shell
git clone https://github.com/mvig-robotflow/rfimu-realsense-recorder
cd rfimu-realsense-recorder
python setup.py
```
### From PyPi
```shell
python -m pip install realsense-recorder
```
## Usage
### Script Usage
```python
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:
```shell
python -m realsense-recorder configure
```
To launch a remote record station that supports REST API
```shell
python -m realsense-recorder run --app=remote_record_seq
```
Raw data
{
"_id": null,
"home_page": "",
"name": "realsense-recorder",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "davidliyutong",
"author_email": "davidliyutong@sjtu.edu.cn",
"download_url": "https://files.pythonhosted.org/packages/3b/50/9b16ec3a71e8c3c44d036fcce53555dd5bdf9b8969129b7739fb104bef49/realsense-recorder-1.4.tar.gz",
"platform": null,
"description": "# RealsenseRecorder\n\nA 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)\n\n## Installation\n\n### From Source\n\n```shell\ngit clone https://github.com/mvig-robotflow/rfimu-realsense-recorder\ncd rfimu-realsense-recorder\npython setup.py\n```\n\n### From PyPi\n\n```shell\npython -m pip install realsense-recorder\n```\n\n## Usage\n\n### Script Usage\n\n```python\nimport io\n\nimport cv2\nimport numpy as np\nimport yaml\nfrom realsense_recorder.common import new_realsense_camera_system_from_config, RealsenseSystemModel\n\ncfg_str = \"\"\"\nrealsense:\n cameras:\n - color:\n - exposure: -1\n format: rs.format.bgra8\n fps: 30\n height: 1080\n width: 1920\n depth: [] # Do not user depth \n endpoint: {}\n imu: []\n product_id: 0B64 # 0B64 for L515\n product_line: L500 # Currently supported models are L500(L515) and D400(D435)\n ref: 1\n sn: f0220485 # SN of target Camera, can get from RealSenseViewer\n system:\n base_dir: ./realsense_data\n frame_queue_size: 100\n interactive: false\n interval_ms: 0\n use_bag: false\n\"\"\"\n\n\ndef main():\n cfg = yaml.load(io.StringIO(cfg_str), yaml.SafeLoader)\n sys = new_realsense_camera_system_from_config(RealsenseSystemModel, cfg['realsense'], None)\n print(sys.cameras)\n cam = sys.cameras[0]\n cam.open()\n cam.start()\n mtx = np.array(cam.intrinsics_matrix)\n while True:\n color_image, depth_image, ts, sys_ts, frame_counter = cam.get_frames()\n cv2.imshow(\"frame\", color_image)\n key = cv2.waitKey(1)\n if key == 27:\n print('esc break...')\n cv2.destroyAllWindows()\n break\n\nmain()\n```\n\n### Command Line Usage\n\nTo Create and persist record configuration:\n\n```shell\npython -m realsense-recorder configure\n```\n\nTo launch a remote record station that supports REST API\n\n```shell\npython -m realsense-recorder run --app=remote_record_seq\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Realsense remote recorder",
"version": "1.4",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "13bab788bbba3625daf7e74e8183ac4a228279352c7815dc2c6758045c7a3a1c",
"md5": "d66a580d0fac7230d2a7a1bef6575c08",
"sha256": "4c3a569bafd4bd764942c68366ccd0ff7493723eba25dff55664abdcc5c9ee4f"
},
"downloads": -1,
"filename": "realsense_recorder-1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d66a580d0fac7230d2a7a1bef6575c08",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 25302,
"upload_time": "2023-01-13T07:39:17",
"upload_time_iso_8601": "2023-01-13T07:39:17.050127Z",
"url": "https://files.pythonhosted.org/packages/13/ba/b788bbba3625daf7e74e8183ac4a228279352c7815dc2c6758045c7a3a1c/realsense_recorder-1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3b509b16ec3a71e8c3c44d036fcce53555dd5bdf9b8969129b7739fb104bef49",
"md5": "215a6079452d61b3b0febb9db976d496",
"sha256": "0a47d457b67f064e60886a47ac7c359e361ea749d35eeab3ece0ebce51ae6801"
},
"downloads": -1,
"filename": "realsense-recorder-1.4.tar.gz",
"has_sig": false,
"md5_digest": "215a6079452d61b3b0febb9db976d496",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 17886,
"upload_time": "2023-01-13T07:39:18",
"upload_time_iso_8601": "2023-01-13T07:39:18.304744Z",
"url": "https://files.pythonhosted.org/packages/3b/50/9b16ec3a71e8c3c44d036fcce53555dd5bdf9b8969129b7739fb104bef49/realsense-recorder-1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-13 07:39:18",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "realsense-recorder"
}