|
|
VisionWorks Toolkit ReferenceApril 8, 2016 | 1.4 Release |
This section includes the OpenCV Interoperability API supported in VisionWorks.
Data Structures | |
| class | nvx_cv::VXImageToCVMatMapper |
| Utility class to map OpenVX Image into OpenCV Mat or GpuMat. More... | |
Functions | |
| vx_matrix | nvx_cv::cloneCVMatToVXMatrix (vx_context context, const cv::Mat &src_mat) |
| Creates OpenVX Matrix object and copies data from OpenCV Mat. More... | |
| vx_df_image | nvx_cv::convertCVMatTypeToVXImageFormat (int mat_type) |
| Converts from OpenCV Mat's type to OpenVX Image's format. More... | |
| vx_enum | nvx_cv::convertCVMatTypeToVXMatrixType (int mat_type) |
| Converts from OpenCV Mat's type to OpenVX Matrix' type. More... | |
| int | nvx_cv::convertVXImageFormatToCVMatType (vx_df_image format, vx_uint32 plane_index=0) |
| Converts from OpenVX Image's format to OpenCV Mat's type. More... | |
| int | nvx_cv::convertVXMatrixTypeToCVMatType (vx_enum matrix_type) |
| Converts from OpenVX Matrix' type to OpenCV Mat's type. More... | |
| void | nvx_cv::copyCVMatToVXMatrix (const cv::Mat &src_mat, vx_matrix dst_mat) |
| Copies data from OpenCV Mat to OpenVX Matrix. More... | |
| void | nvx_cv::copyVXMatrixToCVMat (vx_matrix src_mat, cv::Mat &dst_mat) |
| Copies data from OpenVX Matrix to OpenCV Mat. More... | |
| vx_image | nvx_cv::createVXImageFromCVGpuMat (vx_context context, const cv::gpu::GpuMat &mat) |
| Creates OpenVX Image from OpenCV GpuMat without data copy. More... | |
| vx_image | nvx_cv::createVXImageFromCVMat (vx_context context, const cv::Mat &mat) |
| Creates OpenVX Image from OpenCV Mat without data copy. More... | |
|
inline |
Creates OpenVX Matrix object and copies data from OpenCV Mat.
| [in] | context | OpenVX context. |
| [in] | src_mat | Input OpenCV Mat. |
Definition at line 259 of file nvx_opencv_interop.hpp.
References nvx_cv::convertCVMatTypeToVXMatrixType(), nvx_cv::copyCVMatToVXMatrix(), VX_SUCCESS, vxCreateMatrix(), and vxGetStatus().
|
inline |
Converts from OpenCV Mat's type to OpenVX Image's format.
| [in] | mat_type | OpenCV Mat's type. |
Definition at line 160 of file nvx_opencv_interop.hpp.
References NVX_DF_IMAGE_2F32, NVX_DF_IMAGE_2S16, NVX_DF_IMAGE_F32, NVX_DF_IMAGE_RGB16, VX_DF_IMAGE_RGB, VX_DF_IMAGE_RGBX, VX_DF_IMAGE_S16, VX_DF_IMAGE_S32, VX_DF_IMAGE_U16, and VX_DF_IMAGE_U8.
Referenced by nvx_cv::createVXImageFromCVGpuMat(), and nvx_cv::createVXImageFromCVMat().
|
inline |
Converts from OpenCV Mat's type to OpenVX Matrix' type.
| [in] | mat_type | OpenCV Mat's type. |
Definition at line 78 of file nvx_opencv_interop.hpp.
References NVX_TYPE_POINT2F, NVX_TYPE_POINT3F, VX_TYPE_FLOAT32, VX_TYPE_FLOAT64, VX_TYPE_INT16, VX_TYPE_INT32, VX_TYPE_INT8, VX_TYPE_UINT16, and VX_TYPE_UINT8.
Referenced by nvx_cv::cloneCVMatToVXMatrix().
|
inline |
Converts from OpenVX Image's format to OpenCV Mat's type.
| [in] | format | OpenVX Image's format. |
| [in] | plane_index | Optional OpenVX Image's plane index. |
Definition at line 114 of file nvx_opencv_interop.hpp.
References NVX_DF_IMAGE_2F32, NVX_DF_IMAGE_2S16, NVX_DF_IMAGE_F32, NVX_DF_IMAGE_RGB16, VX_DF_IMAGE_IYUV, VX_DF_IMAGE_NV12, VX_DF_IMAGE_NV21, VX_DF_IMAGE_RGB, VX_DF_IMAGE_RGBX, VX_DF_IMAGE_S16, VX_DF_IMAGE_S32, VX_DF_IMAGE_U16, VX_DF_IMAGE_U32, VX_DF_IMAGE_U8, VX_DF_IMAGE_UYVY, VX_DF_IMAGE_YUV4, and VX_DF_IMAGE_YUYV.
Referenced by nvx_cv::VXImageToCVMatMapper::VXImageToCVMatMapper().
|
inline |
Converts from OpenVX Matrix' type to OpenCV Mat's type.
| [in] | matrix_type | OpenVX Matrix' type. |
Definition at line 42 of file nvx_opencv_interop.hpp.
References NVX_TYPE_POINT2F, NVX_TYPE_POINT3F, VX_TYPE_FLOAT32, VX_TYPE_FLOAT64, VX_TYPE_INT16, VX_TYPE_INT32, VX_TYPE_INT8, VX_TYPE_UINT16, VX_TYPE_UINT32, and VX_TYPE_UINT8.
Referenced by nvx_cv::copyCVMatToVXMatrix(), and nvx_cv::copyVXMatrixToCVMat().
|
inline |
Copies data from OpenCV Mat to OpenVX Matrix.
| [in] | src_mat | Input OpenCV Mat. It must be a continuous matrix. |
| [out] | dst_mat | Output OpenVX Matrix. |
Definition at line 227 of file nvx_opencv_interop.hpp.
References nvx_cv::convertVXMatrixTypeToCVMatType(), VX_MATRIX_ATTRIBUTE_COLUMNS, VX_MATRIX_ATTRIBUTE_ROWS, VX_MATRIX_ATTRIBUTE_TYPE, VX_SUCCESS, vxQueryMatrix(), and vxWriteMatrix().
Referenced by nvx_cv::cloneCVMatToVXMatrix().
|
inline |
Copies data from OpenVX Matrix to OpenCV Mat.
| [in] | src_mat | Input OpenVX Matrix. |
| [out] | dst_mat | Output OpenCV Mat. |
Definition at line 196 of file nvx_opencv_interop.hpp.
References nvx_cv::convertVXMatrixTypeToCVMatType(), VX_MATRIX_ATTRIBUTE_COLUMNS, VX_MATRIX_ATTRIBUTE_ROWS, VX_MATRIX_ATTRIBUTE_TYPE, VX_SUCCESS, vxQueryMatrix(), and vxReadMatrix().
|
inline |
Creates OpenVX Image from OpenCV GpuMat without data copy.
The OpenVX Image points to the same pixels as the OpenCV GpuMat.
| [in] | context | OpenVX context. |
| [in] | mat | Input OpenCV GpuMat to import. |
Definition at line 314 of file nvx_opencv_interop.hpp.
References nvx_cv::convertCVMatTypeToVXImageFormat(), vx_imagepatch_addressing_t::dim_x, NVX_IMPORT_TYPE_CUDA, VX_SUCCESS, vxCreateImageFromHandle(), and vxGetStatus().
|
inline |
Creates OpenVX Image from OpenCV Mat without data copy.
The OpenVX Image points to the same pixels as the OpenCV Mat.
| [in] | context | OpenVX context. |
| [in] | mat | Input OpenCV Mat to import. |
Definition at line 283 of file nvx_opencv_interop.hpp.
References nvx_cv::convertCVMatTypeToVXImageFormat(), vx_imagepatch_addressing_t::dim_x, VX_IMPORT_TYPE_HOST, VX_SUCCESS, vxCreateImageFromHandle(), and vxGetStatus().