### Navigation

- index
- next |
- previous |
- OpenCV 3.0.0-dev documentation »
- OpenCV API Reference »
- core. The Core Functionality »

# Intel® IPP Asynchronous C/C++ Converters

## General Information

This section describes conversion between OpenCV and Intel® IPP Asynchronous C/C++ library. Getting Started Guide help you to install the library, configure header and library build paths.

## hpp::getHpp

Create `hppiMatrix` from `Mat`.

C++:`` hppiMatrix* `hpp::``getHpp`(const Mat& src, hppAccel accel)

  Parameters: | src – input matrix. accel – accelerator instance. Supports type: HPP_ACCEL_TYPE_CPU - accelerated by optimized CPU instructions. HPP_ACCEL_TYPE_GPU - accelerated by GPU programmable units or fixed-function accelerators. HPP_ACCEL_TYPE_ANY - any acceleration or no acceleration available.

This function allocates and initializes the `hppiMatrix` that has the same size and type as input matrix, returns the `hppiMatrix*`.

If you want to use zero-copy for GPU you should to have 4KB aligned matrix data. See details hppiCreateSharedMatrix.

Supports `CV_8U`, `CV_16U`, `CV_16S`, `CV_32S`, `CV_32F`, `CV_64F`.

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.

See also

Intel® IPP Asynchronous C/C++ library in OpenCV, `hpp::getMat()`

## hpp::getMat

Create `Mat` from `hppiMatrix`.

C++:`` Mat `hpp::``getMat`(hppiMatrix* src, hppAccel accel, int cn)

  Parameters: | src – input hppiMatrix. accel – accelerator instance (see `hpp::getHpp()` for the list of acceleration framework types). cn – number of channels.

This function allocates and initializes the `Mat` that has the same size and type as input matrix. Supports `CV_8U`, `CV_16U`, `CV_16S`, `CV_32S`, `CV_32F`, `CV_64F`.

See also

Intel® IPP Asynchronous C/C++ library in OpenCV, `hpp::copyHppToMat()`, `hpp::getHpp()`.

## hpp::copyHppToMat

Convert `hppiMatrix` to `Mat`.

C++:`` void `hpp::``copyHppToMat`(hppiMatrix* src, Mat& dst, hppAccel accel, int cn)

  Parameters: | src – input hppiMatrix. dst – output matrix. accel – accelerator instance (see `hpp::getHpp()` for the list of acceleration framework types). cn – number of channels.

This function allocates and initializes new matrix (if needed) that has the same size and type as input matrix. Supports `CV_8U`, `CV_16U`, `CV_16S`, `CV_32S`, `CV_32F`, `CV_64F`.

See also

Intel® IPP Asynchronous C/C++ library in OpenCV, `hpp::getMat()`, `hpp::getHpp()`.

## Help and Feedback

You did not find what you were looking for?

- Ask a question on the Q&A forum.
- If you think something is missing or wrong in the documentation, please file a bug report.

### Navigation

- index
- next |
- previous |
- OpenCV 3.0.0-dev documentation »
- OpenCV API Reference »
- core. The Core Functionality »