Image and PointCloud sources#
The toolbox provides a variety of sources for these objects. They can be obtained from
files, from cameras, from ROS topics and bag files, from the web, and from other
sources. The toolbox provides a convenient interface to these sources, and the objects
they produce are instances of the Image and
PointCloud classes, which have a large
number of methods for processing and displaying them.
All provide an iterator interface, so they can be used in a for loop to process a sequence of images or point clouds. For example, to read a video file and display each frame:
All sources also have a read method that returns the next image or point cloud. For
example, to read a video file and display each frame:
Some sources also have a __getitem__ method that allows you to index into the source to get a specific image or point cloud. For example, to read the 10th frame of a video file:
All sources serve as a context manager, so they can be used in a with statement to ensure that resources are properly released. For example, to read a video file and display each frame:
All sources have a disp method that displays the image or point cloud using Matplotlib. For example, to read a video file and display each frame:
All sources have a close method that releases any resources associated with the source. For example, to read a video file and display each frame:
All sources have a tensor method that returns the image or point cloud as a PyTorch tensor. For example, to read a video file and display each frame:
Image sources#
Image objects can be conveniently obtained from a variety of sources:
An in-memory sequence of |
|
Iterate images from a collection of files |
|
Iterate images from a compressed archive |
|
Iterate images from a video file |
|
Iterate images from a local video camera |
|
Iterate images from an internet web camera |
|
Iterate images from GoogleEarth |
|
Iterate images and point clouds from a ROS 1 bag file. |
|
Iterate images from a live ROS topic via a rosbridge WebSocket. |
|
Lazy image source from a PyTorch batch tensor. |
|
Read annotations from a LabelMe JSON file. |
Deprecated aliases#
These names are kept for backward compatibility and will emit a deprecation warning.
Deprecated alias for |
|
Deprecated alias for |
PointCloud sources#
PointCloud objects can be conveniently obtained from a variety of sources:
An in-memory sequence of |
|
Iterate images and point clouds from a ROS 1 bag file. |
|
Iterate images from a live ROS topic via a rosbridge WebSocket. |