This class is intended for reading images from different sources.
The source can be:
- Single image (PNG, JPEG, JPG, BMP, TIFF).
- Sequence of images (PNG, JPEG, JPG, BMP, TIFF).
- Video file.
- Video for Linux-compatible cameras.
- NVIDIA GStreamer Camera on NVIDIA® Jetson™ Embedded platforms running L4T R23.
- Note
- GStreamer-based pipeline is used for video decoding on Linux platforms. The support level of video formats depends on the set of installed GStreamer plugins.
- GStreamer-based pipeline with NVIDIA hardware-accelerated codecs is used on NVIDIA Vibrante 3.0 Linux platform only (V3L).
- Pure NVIDIA hardware-accelerated decoding of H.264 elementary video streams is used on NVIDIA Vibrante Linux platforms (V3L, V4L).
- OpenCV (FFmpeg back-end)-based pipeline is used for video decoding on Windows.
- On Vibrante Linux, an active X session is required for
FrameSource
, because it uses EGL as an interop API.
- Image decoding, image sequence decoding, and Video4Linux-compatible camera support require either OpenCV or GStreamer.
FrameSource
is thread safe on all platforms except Vibrante Linux.
std::unique_ptr<FrameSource> nvxio::createDefaultFrameSource |
( |
vx_context |
context, |
|
|
const std::string & |
uri |
|
) |
| |
FrameSource interface factory that provides appropriate implementation by source URI.
- Note
- It supports the following image formats: PNG, JPEG, JPG, BMP, TIFF.
- To read images from a sequence in which, for example,
0000.jpg
corresponds to the first image, 0001.jpg
- the second and so forth, use the path like this: path_to_folder/%04d.jpg
- Use
device://camera0
path to capture images from the first camera. It supports only Video for Linux compatible cameras.
- Use
device://nvcamera0
path to capture frames from NVIDIA GStreamer camera.
- Image decoding, image sequence decoding, and Video4Linux-compatible camera support require either OpenCV or GStreamer.
- Support level of video formats depends on the set of installed GStreamer plugins.
- Parameters
-
[in] | context | The context. |
[in] | uri | A reference to the path to image source. |
- See also
- NVXIO APIs
Loads image from file into OpenVX Image object.
The method is a wrapper around FrameSource to simplify single images loading.
- Parameters
-
[in] | context | The OpenVX context. |
[in] | fileName | The path to the image file. |
[in] | format | The desired output format. |
- Returns
vx_image
object. Calling code is responsible for its releasing.
- See also
- NVXIO APIs