6fac234e2a643bf7b11e39cf5ab7826e8f1d6d0c
[profile/ivi/opencv.git] / modules / core / doc / ipp_async_converters.rst
1 IntelĀ® IPP Asynchronous C/C++ Converters
2 ========================================
3
4 .. highlight:: cpp
5
6 General Information
7 -------------------
8
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.
11
12 hpp::getHpp
13 -----------
14 Create ``hppiMatrix`` from ``Mat``.
15
16 .. ocv:function:: Ptr<hppiMatrix> hpp::getHpp(const Mat& src)
17
18     :param src: input matrix.
19
20 This function allocates and initializes the ``hppiMatrix`` that has the same size and type as input matrix, returns the ``Ptr<hppiMatrix>``.
21 Supports ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32S``, ``CV_32F``, ``CV_64F``.
22
23 .. 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. 
24 .. seealso:: :ref:`howToUseIPPAconversion`, :ocv:func:`hpp::getMat`
25
26
27 hpp::getMat
28 -----------
29 Create ``Mat`` from ``hppiMatrix``.
30
31 .. ocv:function:: Mat hpp::getMat(hppiMatrix* src, hppAccel accel, int cn)
32
33     :param src: input hppiMatrix.
34
35     :param accel: accelerator instance.
36
37     :param cn: number of channels.
38
39 This function allocates and initializes the ``Mat`` that has the same size and type as input matrix. 
40 Supports ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32S``, ``CV_32F``, ``CV_64F``.
41
42 .. seealso:: :ref:`howToUseIPPAconversion`, :ocv:func:`hpp::copyHppToMat`, :ocv:func:`hpp::getHpp`.
43
44
45 hpp::copyHppToMat
46 -----------------
47 Convert ``hppiMatrix`` to ``Mat``.
48
49 .. ocv:function:: void hpp::copyHppToMat(hppiMatrix* src, Mat& dst, hppAccel accel, int cn)
50
51     :param src: input hppiMatrix.
52     
53     :param dst: output matrix.
54
55     :param accel: accelerator instance.
56
57     :param cn: number of channels.
58
59 This function allocates and initializes new matrix (if needed) that has the same size and type as input matrix. 
60 Supports ``CV_8U``, ``CV_16U``, ``CV_16S``, ``CV_32S``, ``CV_32F``, ``CV_64F``.
61
62 .. seealso:: :ref:`howToUseIPPAconversion`, :ocv:func:`hpp::getMat`, :ocv:func:`hpp::getHpp`.