Introduction
This article explains how to enable Intel® Integrated Performance Primitives (Intel® IPP) with OpenCV* for improved performance benefits and efficiency of hardware resources.
Setup for Windows* Systems
To configure OpenCV and enable Intel IPP, do the following:
- Download OpenCV 4.x or above and CMake.
This example uses OpenCV 4.x and CMake 3.30.0-rc4. - Extract OpenCV to your chosen file location.
- Install CMake, and then run the CMake GUI.
- Add the location of OpenCV as the source location, and then choose a location where you want your build to be created.
- Choose your generator. For example, 'Visual Studio 17 2022 Win64'
- Enable Intel IPP using either of the following options:
- Use the free 'ICV', which is a special Intel IPP build for OpenCV provided in Intel IPP.
- Use Intel IPP from any Intel software tool suite (Intel® oneAPI Base Toolkit or as a stand-alone component).
- To use ICV, turn on WITH_IPP. The Intel IPP ICV package downloads automatically, and the CMake configuration catches it.
- To enable Intel IPP from an Intel software toolkit, in addition to setting WITH_IPP, manually add an entry for Intel IPP.
- Select Add Entry.
- In the Name field, enter IPPROOT.
- In the Type field, choose PATH.
- In the Value field, enter the file location where you downloaded Intel IPP.
- The following screenshot shows an example configuration with Intel® oneAPI Base Toolkit 2024.2.
- To build OpenCV with your generator, select Generate.
Setup for Linux* and Ubuntu* Systems
To configure OpenCV and enable Intel IPP, do the following:
- Download OpenCV 4.x or above. This example uses OpenCV 4.x.
- Extract OpenCV to your chosen file location.
- Open a terminal and go to where you extracted OpenCV.
- Enable Intel IPP using either of the following options:
- Use the free 'ICV', which is a special Intel IPP build for OpenCV provided in Intel IPP.
- Use Intel IPP from any Intel software tool suite (Intel® oneAPI Base Toolkit or as a stand-alone component).
- For ICV, type mkdir build && cd build && cmake .. -DWITH_IPP=ON. Following is an example of the configuration for ICV.
- For Intel IPP from an Intel software toolkit, type mkdir build && cd build && cmake .. -DWITH_IPP=ON -DIPPROOT=<Your IPP Location>
- The following example shows the configuration result.
- If the configuration went without a problem, type make -j4
- When the building is complete, to install the library, type make install.