VisionWorks Toolkit Reference

April 8, 2016 | 1.4 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvx_cv::VXImageToCVMatMapper Class Reference

Detailed Description

Utility class to map OpenVX Image into OpenCV Mat or GpuMat.

The class maps OpenVX Image into OpenCV Mat or GpuMat in constructor and unmaps OpenVX Image in destructor.

Note
The input OpenVX Image must not be destroyed until the class' destructor is called.

Definition at line 341 of file nvx_opencv_interop.hpp.

Public Member Functions

cv::gpu::GpuMat getGpuMat ()
 Gets mapped OpenCV GpuMat. More...
 
cv::Mat getMat ()
 Gets mapped OpenCV Mat. More...
 
 VXImageToCVMatMapper (vx_image image, vx_uint32 plane_index=0, const vx_rectangle_t *rect=NULL, vx_enum usage=VX_READ_AND_WRITE, vx_enum memory_type=VX_IMPORT_TYPE_HOST)
 Maps input OpenVX Image into OpenCV Mat or GpuMat without memory copy. More...
 
 ~VXImageToCVMatMapper ()
 Unmaps a mapped region of an OpenVX Image. More...
 

Constructor & Destructor Documentation

nvx_cv::VXImageToCVMatMapper::VXImageToCVMatMapper ( vx_image  image,
vx_uint32  plane_index = 0,
const vx_rectangle_t *  rect = NULL,
vx_enum  usage = VX_READ_AND_WRITE,
vx_enum  memory_type = VX_IMPORT_TYPE_HOST 
)
inlineexplicit

Maps input OpenVX Image into OpenCV Mat or GpuMat without memory copy.

Parameters
[in]imageInput OpenVX Image.
[in]plane_indexPlane index to map.
[in]rectRegion to map. Use NULL to map the whole Image region.
[in]usageIntended usage of mapped memory (VX_READ_ONLY, VX_WRITE_ONLY or VX_READ_AND_WRITE).
[in]memory_typeIntended memory type of the mapped memory (VX_IMPORT_TYPE_HOST for Mat or NVX_IMPORT_TYPE_CUDA for GpuMat).

Definition at line 355 of file nvx_opencv_interop.hpp.

References nvx_cv::convertVXImageFormatToCVMatType(), vx_imagepatch_addressing_t::dim_x, vx_imagepatch_addressing_t::dim_y, vx_rectangle_t::end_x, vx_rectangle_t::end_y, NVX_IMPORT_TYPE_CUDA, NVX_MAP_NO_PIXEL_GAPS, nvxMapImagePatch(), vx_imagepatch_addressing_t::scale_x, vx_imagepatch_addressing_t::scale_y, vx_rectangle_t::start_x, vx_rectangle_t::start_y, vx_imagepatch_addressing_t::stride_y, VX_DF_IMAGE_VIRT, VX_IMAGE_ATTRIBUTE_FORMAT, VX_IMAGE_ATTRIBUTE_HEIGHT, VX_IMAGE_ATTRIBUTE_WIDTH, VX_IMPORT_TYPE_HOST, VX_SCALE_UNITY, VX_SUCCESS, and vxQueryImage().

nvx_cv::VXImageToCVMatMapper::~VXImageToCVMatMapper ( )
inline

Unmaps a mapped region of an OpenVX Image.

Definition at line 408 of file nvx_opencv_interop.hpp.

References nvxUnmapImagePatch().

Member Function Documentation

cv::gpu::GpuMat nvx_cv::VXImageToCVMatMapper::getGpuMat ( )
inline

Gets mapped OpenCV GpuMat.

Returns
Mapped OpenCV GpuMat.

Definition at line 429 of file nvx_opencv_interop.hpp.

cv::Mat nvx_cv::VXImageToCVMatMapper::getMat ( )
inline

Gets mapped OpenCV Mat.

Returns
Mapped OpenCV Mat.

Definition at line 418 of file nvx_opencv_interop.hpp.


The documentation for this class was generated from the following file: