Summary
This article shows performance improvement for cv::warpPerspective performance with Intel® Integrated Performance Primitives (Intel® IPP) integration in OpenCV, measuring up to 6x speedup over OpenCV baseline. Intel® IPP 2026.0.0 shows 20-70% improvement over Intel® IPP 2022.0.0.
Introduction
cv::warpPerspective applies a perspective transformation to an image. It is commonly used in document scanning, image stitching, augmented reality, and camera calibration. OpenCV (Open Source Computer Vision Library) is one of the most widely used open-source computer vision libraries, covering image processing, object detection, 3D reconstruction, and more across C++, Python, and Java. It provides an implementation that can be accelerated with Intel® Integrated Performance Primitives (Intel® IPP). Intel® IPP is a library of highly optimized functions for image processing, signal processing, data processing, and computer vision, leveraging Intel® Streaming SIMD Extensions 4.2 (Intel® SSE4.2), Intel® Advanced Vector Extensions 2 (Intel® AVX2), and Intel® Advanced Vector Extensions 512 (Intel® AVX-512) instruction sets. Intel® IPP is available standalone or as part of Intel® oneAPI Base Toolkit (Base Kit).
OpenCV integrates with Intel® IPP through a Hardware Abstraction Layer (HAL). When built with Intel® IPP support, OpenCV checks at runtime whether the called function and its parameters have an Intel® IPP implementation and dispatches accordingly; unsupported cases fall back to the default OpenCV code.
Intel also provides Intel® IPP ICV that is a subset of Intel® IPP containing only the functions OpenCV uses. It can be downloaded automatically during the build (WITH_IPP=ON) and performs identically to the full library for the included functions.
Building OpenCV with Intel® IPP
To build OpenCV with Intel® IPP support you need CMake 3.11+, a C++11 compiler, and Intel® IPP (standalone or from Intel Base Kit). The key CMake flags are:
cmake <path-to-opencv-source> \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_IPP=ON \
-DWITH_IPP_CALLS_ENFORCED=ON
If WITH_IPP=ON is set and no system Intel® IPP is found, CMake will automatically download Intel® IPP ICV. To point CMake to an existing Intel® IPP installation, add path option -DIPPROOT=/path/to/ipp (usually /opt/intel/oneapi/ipp/latest).
A successful configuration prints the detected Intel® IPP version in the CMake output:
-- found Intel® IPP (ICV version): 2026.0.0 [2026.0.0]
-- at: /path/to/icv/package
...
WITH_IPP_CALLS_ENFORCED=ON: enforced IPP calls are enabled in IPP HAL
Note that not all Intel® IPP optimized modes for warpPerspective are enabled by default, because some modes produce results that are not bit-exact with the default OpenCV implementation. The flag WITH_IPP_CALLS_ENFORCED=ON enables these modes. The numerical differences are typically negligible, but if your application requires bit-exact reproducibility with default OpenCV, leave this option disabled.
Benchmark Methodology
The benchmarks were run on a single node with 2x Intel® Xeon® 6972P processor on AvenueCity platform with 1536 GB (24 slots/ 64GB/ 8800) total DDR5 memory, HT on, Turbo on, Ubuntu 24.04 LTS and 6.8.0-90-generic kernel. A single CPU has 96 cores which are clustered into 3 NUMA nodes with 32 cores each. We tested OpenCV 4.13.0-173-g9eb887d02d with two Intel® IPP versions: 2022.0.0 and 2026.0.0. Used single threaded mode.
The benchmark calls cv::warpPerspective across three resolutions (VGA, 720p, 1080p), two interpolation modes (INTER_NEAREST, INTER_LINEAR), nine data types (CV_8UC1/C3/C4, CV_16UC1/C3/C4, CV_32FC1/C3/C4), and BORDER_REPLICATE. The transformation matrix maps a skewed quadrilateral (corners at roughly 10-20% inset from the image edges) to the full image rectangle:
Source points 0, destination points 1:
// 1 _ _ _ _ _ _ _ _ 1
// _ _ _ _ _ _ _ _ 0 _
// _ _ 0 _ _ _ _ _ _ _
// _ _ _ _ _ _ _ _ _ _
// _ _ _ _ _ _ _ _ _ _
// _ _ _ _ _ _ _ _ _ _
// _ _ _ _ _ _ _ _ _ _
// _ _ _ _ _ _ _ _ 0 _
// _ 0 _ _ _ _ _ _ _ _
// 1 _ _ _ _ _ _ _ _ 1
Timing is done with Google Benchmark, which handles iteration count adjustment and statistical analysis.
Performance Results
The figures below show INTER_LINEAR results. Each row compares the Intel® IPP-accelerated run to the baseline OpenCV run (noIPP = 1.0x, higher is better).

Analysis
Intel® IPP provides consistent speedups across all tested configurations. The improvement from Intel® IPP 2022.0.0 to 2026.0.0 breaks down as follows:
| Data Type | Average Improvement (2026 over 2022) |
|---|---|
| 8U | ~20-43% |
| 16U | ~29-35% |
| 32F | ~24-76% |
The 2026.0.0 gains come from improved Intel AVX-512 utilization and vectorization.
For INTER_NEAREST interpolation (not shown in the tables), Intel® IPP provides 2.5-3.8x speedup over baseline OpenCV, consistent across both Intel® IPP versions.
How to Reproduce
The benchmark requires OpenCV built with Intel® IPP (see above) and the Google Benchmark library binaries. Create a project directory with the following two files:
- CMakeLists.txt
cmake_minimum_required(VERSION 3.11) project(WarpBenchmark) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(OpenCV REQUIRED core imgproc) find_package(benchmark REQUIRED) add_executable(bench_warp_persp bench_warp_persp.cpp) target_link_libraries(bench_warp_persp PRIVATE opencv_core opencv_imgproc benchmark::benchmark ) - bench_warp_persp.cpp
cmake <path-to-benchmark-source> \ -DOpenCV_DIR=/path/to/opencv/build \ -Dbenchmark_DIR=/path/to/benchmark/lib/cmake/benchmark/build make
Then configure and build:
cmake <path-to-benchmark-source> \
-DOpenCV_DIR=/path/to/opencv/build \
-Dbenchmark_DIR=/path/to/benchmark/lib/cmake/benchmark/build
make
To run:
OPENCV_FOR_THREADS_NUM=1 ./bench_warp_persp --benchmark_out_format=csv --benchmark_out=results.csv
See the Google Benchmark User Guide for additional options.
Conclusion
Enabling Intel® IPP in OpenCV provides up to 6x speedup (2026.0.0) for cv::warpPerspective with no application code changes — only a rebuild is required. Upgrading from Intel® IPP 2022.0.0 to 2026.0.0 yields 20-70% improvement. The gains are consistent across all tested data types, channel counts, and resolutions.
References

