Data collection: Enable opencv to use IPP

Source: Internet
Author: User

Full text copy from: http://www.opencv.org.cn/forum/viewtopic.php? F = 1 & t = 782 & P = 15103

1. opencv does automatically load these optimization libraries at runtime, and does not need to run the cvuseoptimized () function, provided that the environment variables are registered in the relevant paths of the library.

The following code can be run:ProgramInspection:
Const char * opencv_libraries = 0;
Const char * addon_modules = 0;
Cvgetmoduleinfo (0, & opencv_libraries, & addon_modules );
Printf ("opencv: % s \ r \ nadd-on modules: % s \ r \ n.", opencv_libraries, addon_modules );
If the automatic loading is successful, the following output is displayed:
Opencv: cxcore: 1.0.0, CV: 1.0.0
Add-on modules: ippcv-5.1.dll, ippi-5.1.dll, ipps-5.1.dll, ippvm-5.1.dll, mkl_p4.dll
Run cvuseoptimized (1) again. By checking the return value, you can know how many functions are optimized.

2. Different function optimizations vary.
Several functions are used to test the optimization degree after the optimization library is loaded:
System: P4 (2.6G) 512 mb xp vc6
Test image: 768x576 8uc1
Loop 100 times
Test function cvsmooth (cv_gaussian, 31*31) 2493 ms (with iPP) 5498 ms (without iPP)
Test function cvsobel (7*7) 1674 ms (with iPP) 1672 ms (without iPP)
Test function cvkan (3*3) 2901 ms (with iPP) 3385 ms (without iPP)
We can see that the degree of Optimization for different functions is different. cvsmooth has a high degree of optimization, and the performance has been improved by more than 50%. cvsobel has basically not changed. Some foreigners on the Internet also say that the speed has decreased after IPP is used.

So you don't need to use IPP ($199). You have to test your own program. Fortunately, the evaluation version of IPP can be used now. It would be nice to provide a function optimization table for the next version of opencv.

 

In addition: http://blog.sina.com.cn/s/blog_675662490100idkf.html

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.