|
|
VisionWorks Toolkit ReferenceApril 8, 2016 | 1.4 Release |
Defines NVXIO Utility API.
Data Structures | |
| struct | nvxio::ContextGuard |
ContextGuard is a wrapper for vx_context. More... | |
Macros | |
| #define | NVXIO_ASSERT(cond) |
| Checks a condition. More... | |
| #define | NVXIO_CHECK_REFERENCE(ref) NVXIO_ASSERT(ref != 0 && vxGetStatus((vx_reference)ref) == VX_SUCCESS) |
| Checks a reference. More... | |
| #define | NVXIO_CUDA_SAFE_CALL(cudaOp) |
| Performs a CUDA operation. More... | |
| #define | NVXIO_SAFE_CALL(vxOp) |
| Performs an NVX operation. More... | |
| #define | NVXIO_THROW_EXCEPTION(msg) |
Throws std::runtime_error exception. More... | |
Functions | |
| NVXIO_EXPORT void | nvxio::checkIfContextIsValid (vx_context context) |
| Checks whether the context is valid and throws an exception in case of failure. More... | |
| template<typename T , vx_size N> | |
| vx_size | nvxio::dimOf (T(&)[N]) |
Returns the size of an array (the N template argument). More... | |
| NVXIO_EXPORT std::vector < std::string > | nvxio::getSupportedFeatures () |
| Returns a vector of NVXIO supported features. More... | |
| template<typename T , typename... Args> | |
| std::unique_ptr< T > | nvxio::makeUP (Args &&...args) |
| make_unique function. More... | |
| NVXIO_EXPORT void | nvxio::printPerf (vx_graph graph, const char *label) |
| Prints performance information for the provided graph object. More... | |
| NVXIO_EXPORT void | nvxio::printPerf (vx_node node, const char *label) |
| Prints performance information for the provided node object. More... | |
| NVXIO_EXPORT void VX_CALLBACK | nvxio::stdoutLogCallback (vx_context context, vx_reference ref, vx_status status, const vx_char string[]) |
| The callback for OpenVX error logs, which prints messages to standard output. More... | |
Variables | |
| const vx_float64 | nvxio::PI = 3.1415926535897932 |
| Double-precision PI. More... | |
| const vx_float32 | nvxio::PI_F = 3.14159265f |
| Float-precision PI. More... | |
| #define NVXIO_ASSERT | ( | cond | ) |
Checks a condition.
If the condition is false then it throws std::runtime_error exception.
| [in] | cond | Expression to be evaluated. |
Definition at line 145 of file Utility.hpp.
| #define NVXIO_CHECK_REFERENCE | ( | ref | ) | NVXIO_ASSERT(ref != 0 && vxGetStatus((vx_reference)ref) == VX_SUCCESS) |
Checks a reference.
If the reference is not valid then it throws std::runtime_error exception.
| [in] | ref | Reference to be checked. |
Definition at line 160 of file Utility.hpp.
| #define NVXIO_CUDA_SAFE_CALL | ( | cudaOp | ) |
Performs a CUDA operation.
If the operation fails, then it throws std::runtime_error exception.
| [in] | cudaOp | Specifies a function to be called. The function must have cudaError_t return value. |
Definition at line 170 of file Utility.hpp.
| #define NVXIO_SAFE_CALL | ( | vxOp | ) |
Performs an NVX operation.
If the operation fails, then it throws std::runtime_error exception.
| [in] | vxOp | A function to be called. The function must have vx_status return value. |
Definition at line 129 of file Utility.hpp.
| #define NVXIO_THROW_EXCEPTION | ( | msg | ) |
Throws std::runtime_error exception.
| [in] | msg | A message with content related to the exception. |
Definition at line 115 of file Utility.hpp.
| NVXIO_EXPORT void nvxio::checkIfContextIsValid | ( | vx_context | context | ) |
Checks whether the context is valid and throws an exception in case of failure.
| [in] | context | Specifies the context to check. |
Referenced by nvxio::ContextGuard::ContextGuard().
| vx_size nvxio::dimOf | ( | T(&) | [N] | ) |
Returns the size of an array (the N template argument).
Definition at line 188 of file Utility.hpp.
| NVXIO_EXPORT std::vector<std::string> nvxio::getSupportedFeatures | ( | ) |
Returns a vector of NVXIO supported features.
The following scheme is used to describe the features in the form of tree:
<feature_type>:<IO_object_type>:<backend>:<details_0>:<details_1>:...
<feature_type> possible values:
render2d - describes a set of 2D renders.render3d - describes a set of 3D renders.source - describes a set of frame sources.<IO_object_type> possible values:
image - a sequence of images. The source features read the sequence; the render features write the sequence.video - a video file.window - a UI window.camera - different types of cameras - USB, CSI, etc.<backend> possible values:
opencv - implementation using OpenCV drawing utilities.opengl - implementation using OpenGL (ES) shaders.gstreamer - GStreamer implementation.v4l2 - Video 4 Linux 2 implementationnvmedia - NvMedia implementationopenmax - OpenMAX implementation<details_N> tags can store any additional information about the feature.
Examples:
render2d:video:gstreamer: a 2D render that can write to a video file using GStreamer backendsource:video:nvmedia:pure: a frame source that can fetch images from a video file using the "pure" NvMedia backendsource:camera:nvmedia:pure:dvp-ov10635-yuv422-ab: a frame source that can fetch images from an OV10635 camera attached to ab ports in a YUV422 format using "pure" NvMedia backend.| std::unique_ptr<T> nvxio::makeUP | ( | Args &&... | args | ) |
| NVXIO_EXPORT void nvxio::printPerf | ( | vx_graph | graph, |
| const char * | label | ||
| ) |
Prints performance information for the provided graph object.
| [in] | graph | Specifies the graph object. |
| [in] | label | Specifies the label. |
| NVXIO_EXPORT void nvxio::printPerf | ( | vx_node | node, |
| const char * | label | ||
| ) |
Prints performance information for the provided node object.
| [in] | node | Specifies the node object. |
| [in] | label | Specifies the label. |
| NVXIO_EXPORT void VX_CALLBACK nvxio::stdoutLogCallback | ( | vx_context | context, |
| vx_reference | ref, | ||
| vx_status | status, | ||
| const vx_char | string[] | ||
| ) |
The callback for OpenVX error logs, which prints messages to standard output.
Must be used as a parameter for vxRegisterLogCallback.
| [in] | context | Specifies the OpenVX context. |
| [in] | ref | Specifies the reference to the object that generated the error message. |
| [in] | status | Specifies the error code. |
| [in] | string | Specifies the error message. |
| const vx_float64 nvxio::PI = 3.1415926535897932 |
| const vx_float32 nvxio::PI_F = 3.14159265f |