VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
FrameSource

Detailed Description

This class is intended for reading images from different sources.

The source can be:

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.

Data Structures

class  nvxio::FrameSource
 FrameSource interface. More...
 

Functions

std::unique_ptr< FrameSource > nvxio::createDefaultFrameSource (vx_context context, const std::string &uri)
 FrameSource interface factory that provides appropriate implementation by source URI. More...
 
vx_image nvxio::loadImageFromFile (vx_context context, const std::string &fileName, vx_df_image format=VX_DF_IMAGE_RGB)
 Loads image from file into OpenVX Image object. More...
 

Function Documentation

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]contextThe context.
[in]uriA reference to the path to image source.
See also
NVXIO APIs
vx_image nvxio::loadImageFromFile ( vx_context  context,
const std::string &  fileName,
vx_df_image  format = VX_DF_IMAGE_RGB 
)

Loads image from file into OpenVX Image object.

The method is a wrapper around FrameSource to simplify single images loading.

Parameters
[in]contextThe OpenVX context.
[in]fileNameThe path to the image file.
[in]formatThe desired output format.
Returns
vx_image object. Calling code is responsible for its releasing.
See also
NVXIO APIs