Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

OpenCV is not showing improvement when running with IPP

eitan_s_
Beginner
3,088 Views

Hi All,

I installed latest IPP product and I have video processing code in OpenCV. I recompiled OpenCV with flag WITH_IPP however I don't see any performance improvement. What I'm missing ? How can I tell OpenCV is detecting the IPP ?

0 Kudos
1 Solution
Pavel_V_Intel
Employee
3,112 Views

Now after make finish I'm getting error:

You need to apply this patch: https://github.com/opencv/opencv/pull/8109/files

View solution in original post

0 Kudos
26 Replies
Pavel_V_Intel
Employee
3,113 Views

Now after make finish I'm getting error:

You need to apply this patch: https://github.com/opencv/opencv/pull/8109/files

0 Kudos
Pavel_V_Intel
Employee
598 Views

[EITANS]  "there is no guaranty" .... is that a general statement or only when using ICV ?

In general, not every OpenCV function is optimized with IPP, so performance benefit from IPP depends on functionality you are using.

[EITANS] Can you elaborate how to use it and what does it tells me ?

This function can switch IPP optimizations on and off for any following OpenCV function. By default every available optimizations is enabled. By the way if you built OpenCV with OpenCL support many IPP optimizations could be overshadowed by OpenCL code, since it has higher priority in most cases.

You can measure IPP performance using this template:

// Turn off all optimizations except IPP
cv::setUseOptimized(false);
cv::ipp::setUseIPP(true);
timer_start
cv::resize(...)
timer_end

// Turn on all optimizations except IPP
cv::setUseOptimized(true);
cv::ipp::setUseIPP(false);
timer_start
cv::resize(...)
timer_end

 

0 Kudos
eitan_s_
Beginner
598 Views

The patch worked. Great.

You wrote: ... You can check performance difference by using cv::ipp::setUseIPP(bool) function before OpenCV calls.

[EITANS] Can you elaborate how to use it and what does it tells me ?

0 Kudos
eitan_s_
Beginner
598 Views

I see update about how to use setUseIPP. Thanks. Will try it out first.

0 Kudos
eitan_s_
Beginner
598 Views

@Pavel, I see the method cv2.setUseOptimized(False) however I can't find 'ipp' over the CV2 python module. Thoughts ?

0 Kudos
Pavel_V_Intel
Employee
598 Views

 I see the method cv2.setUseOptimized(False) however I can't find 'ipp' over the CV2 python module. Thoughts ?

It seems that these functions are not declared for export to python. I submitted another patch: https://github.com/opencv/opencv/pull/8114/files

Thanks!

0 Kudos
Reply