1 IntelĀ® IPP Asynchronous C/C++ Converters
2 ========================================
9 This section describes conversion between OpenCV and `IntelĀ® IPP Asynchronous C/C++ <http://software.intel.com/en-us/intel-ipp-preview>`_ library.
10 `Getting Started Guide <http://registrationcenter.intel.com/irc_nas/3727/ipp_async_get_started.htm>`_ help you to install the library, configure header and library build paths.
14 Create ``hppiMatrix`` from ``Mat``.
16 .. ocv:function:: hppiMatrix* hpp::getHpp(const Mat& src, hppAccel accel)
18 :param src: input matrix.
19 :param accel: accelerator instance. Supports type:
21 * **HPP_ACCEL_TYPE_CPU** - accelerated by optimized CPU instructions.
23 * **HPP_ACCEL_TYPE_GPU** - accelerated by GPU programmable units or fixed-function accelerators.
25 * **HPP_ACCEL_TYPE_ANY** - any acceleration or no acceleration available.
27 This function allocates and initializes the ``hppiMatrix`` that has the same size and type as input matrix, returns the ``hppiMatrix*``.
29 If you want to use zero-copy for GPU you should to have 4KB aligned matrix data. See details `hppiCreateSharedMatrix <http://software.intel.com/ru-ru/node/501697>`_.
31 Supports ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32S``, ``CV_32F``, ``CV_64F``.
33 .. note:: The ``hppiMatrix`` pointer to the image buffer in system memory refers to the ``src.data``. Control the lifetime of the matrix and don't change its data, if there is no special need.
34 .. seealso:: :ref:`howToUseIPPAconversion`, :ocv:func:`hpp::getMat`
39 Create ``Mat`` from ``hppiMatrix``.
41 .. ocv:function:: Mat hpp::getMat(hppiMatrix* src, hppAccel accel, int cn)
43 :param src: input hppiMatrix.
45 :param accel: accelerator instance (see :ocv:func:`hpp::getHpp` for the list of acceleration framework types).
47 :param cn: number of channels.
49 This function allocates and initializes the ``Mat`` that has the same size and type as input matrix.
50 Supports ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32S``, ``CV_32F``, ``CV_64F``.
52 .. seealso:: :ref:`howToUseIPPAconversion`, :ocv:func:`hpp::copyHppToMat`, :ocv:func:`hpp::getHpp`.
57 Convert ``hppiMatrix`` to ``Mat``.
59 .. ocv:function:: void hpp::copyHppToMat(hppiMatrix* src, Mat& dst, hppAccel accel, int cn)
61 :param src: input hppiMatrix.
63 :param dst: output matrix.
65 :param accel: accelerator instance (see :ocv:func:`hpp::getHpp` for the list of acceleration framework types).
67 :param cn: number of channels.
69 This function allocates and initializes new matrix (if needed) that has the same size and type as input matrix.
70 Supports ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32S``, ``CV_32F``, ``CV_64F``.
72 .. seealso:: :ref:`howToUseIPPAconversion`, :ocv:func:`hpp::getMat`, :ocv:func:`hpp::getHpp`.