Enable Intel® IPP on OpenCV* (Windows* and Ubuntu*)

ID 672485
Updated 10/14/2024
Version Latest
Public

author-image

By

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:
 

  1. Download OpenCV 4.x or above and CMake.
    This example uses OpenCV 4.x and CMake 3.30.0-rc4.
  2. Extract OpenCV to your chosen file location.
  3. Install CMake, and then run the CMake GUI.
  4. Add the location of OpenCV as the source location, and then choose a location where you want your build to be created.""
  5. Choose your generator. For example, 'Visual Studio 17 2022 Win64'
  6. Enable Intel IPP using either of the following options:
  7. To use ICV, turn on WITH_IPP. The Intel IPP ICV package downloads automatically, and the CMake configuration catches it.
    ""

  8. 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.
  9. The following screenshot shows an example configuration with Intel® oneAPI Base Toolkit 2024.2.




  10. To build OpenCV with your generator, select Generate.

Setup for Linux* and Ubuntu* Systems

To configure OpenCV and enable Intel IPP, do the following:
 

  1. Download OpenCV 4.x or above. This example uses OpenCV 4.x.
  2. Extract OpenCV to your chosen file location.
  3. Open a terminal and go to where you extracted OpenCV.
  4. Enable Intel IPP using either of the following options:
  5. For ICV, type mkdir build && cd build && cmake .. -DWITH_IPP=ON. Following is an example of the configuration for ICV.
  6. For Intel IPP from an Intel software toolkit, type mkdir build && cd build && cmake .. -DWITH_IPP=ON -DIPPROOT=<Your IPP Location>
  7. The following example shows the configuration result.
  8. If the configuration went without a problem, type make -j4
  9. When the building is complete, to install the library, type make install.