VisionWorks Toolkit Reference

April 8, 2016 | 1.4 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 Linux platform only (V3L, V4L).
  • 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.

URI-based scheme to specify data sources

The URI-based scheme is used to describe data sources:

 <scheme>:///<host>[?<arg1=value1>&<arg2=value2>[&...]]

The scheme can be:

The list of configurations for an access to Omni Vision cameras

Board name Camera Interface Camera Type Configuration name
Jetson TK1 Pro AB OV10635 dvp-ov10635-yuv422-ab
Jetson TK1 Pro CD OV10635 dvp-ov10635-yuv422-cd
Jetson TK1 Pro EF OV10635 dvp-ov10635-yuv422-ef
DRIVE PX B00 AB OV10635 dvp-ov10635-yuv422-ab-e2379
DRIVE PX B00 CD OV10635 dvp-ov10635-yuv422-cd-e2379
DRIVE PX B00 EF OV10635 dvp-ov10635-yuv422-ef-e2379
DRIVE PX B00 AB OV10640 dvp-ov10640-raw12-ab-e2379
DRIVE CX AB OV10635 dvp-ov10635-yuv422-ab-p2382
DRIVE CX AB OV10640 dvp-ov10640-raw12-ab-p2382
E2580 EF OV10635 dvp-ov10635-yuv422-ef-e2580

Data Structures

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

Functions

NVXIO_EXPORT std::unique_ptr
< FrameSource > 
nvxio::createDefaultFrameSource (vx_context context, const std::string &uri)
 FrameSource interface factory that provides appropriate implementation by source URI. More...
 
NVXIO_EXPORT 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

NVXIO_EXPORT 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:///v4l2?index=0" path to capture images from the first camera. It supports only Video for Linux compatible cameras.
  • Use "device:///nvcamera" path to capture frames from NVIDIA GStreamer camera.
  • Use "device:///nvmedia?config=dvp-ov10635-yuv422-ab-e2379&number=4" path to capture frames from Omni Vision cameras via NvMedia.
  • 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
NVXIO_EXPORT 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