Skip to main content

Pure Python library to convert ros image message data from and to opencv2.

Project description

pipeline status coverage report

Rosbags-image

Rosbags-image is the pure python library for interacting with image or compressed image messages and it aims to provide the same functionality as cv_bridge. It is part of the larger Rosbags ecosystem.

Rosbags-image does not have any dependencies on the ROS software stacks and can be used on its own or alongside ROS1 or ROS2.

Getting started

Rosbags-image is published on PyPI and does not have any special dependencies. Simply install with pip:

pip install rosbags-image

Convert sensor_msgs/msg/Image message into OpenCV image:

from rosbags.image import message_to_cvimage

# msg is rosbags Image or CompressedImage message instance
msg = ...

# get opencv image without any conversions
img = message_to_cvimage(msg)

# get opencv image and convert to bgr8 color space
img = message_to_cvimage(msg, 'bgr8')

Documentation

Read the documentation for further information.

Contributing

Thank you for considering to contribute to rosbags-image.

To submit issues or create merge requests please follow the instructions provided in the contribution guide.

By contributing to rosbags-image you accept and agree to the terms and conditions laid out in there.

Development

Clone the repository and setup your local checkout:

git clone https://gitlab.com/ternaris/rosbags-image.git

cd rosbags-image
python -m venv venv
. venv/bin/activate

pip install -r requirements-dev.txt
pip install -e .

This creates a new virtual environment with the necessary python dependencies and installs rosbags-image in editable mode. The rosbags-image code base uses pytest as its test runner, run the test suite by simply invoking:

pytest

To build the documentation from its source run sphinx-build:

sphinx-build -a docs public

The entry point to the local documentation build should be available under public/index.html.

Support

Professional support is available from Ternaris.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rosbags_image-0.10.3.tar.gz (99.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rosbags_image-0.10.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file rosbags_image-0.10.3.tar.gz.

File metadata

  • Download URL: rosbags_image-0.10.3.tar.gz
  • Upload date:
  • Size: 99.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.2

File hashes

Hashes for rosbags_image-0.10.3.tar.gz
Algorithm Hash digest
SHA256 8d89a0fcdd61b3b6bf7e5dde416456f65ac2e0f6473f36686ba3610f1fc1b2ca
MD5 122e8f9244df2822e07ccf5f7839cefc
BLAKE2b-256 36c5a1106ac154a1bcb9faf1e262cd002fd0e7330886613ca0efbd9e225e64a7

See more details on using hashes here.

File details

Details for the file rosbags_image-0.10.3-py3-none-any.whl.

File metadata

File hashes

Hashes for rosbags_image-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f3b50d78120f91303074dc5e953e8081dec8876e72ac3910a1bb5915b45b390d
MD5 e97ef7cda8f9b0657b9331bfd3c3d051
BLAKE2b-256 06f505dc103aa3a5f2246785b67690f8c3c45c992de2ffa319e66ba1dd13d673

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page