Community
cancel
Showing results for 
Search instead for 
Did you mean: 
micmac34
Beginner
130 Views

IPP doesn't work with OpenCV 2.0

Hi,

I am currently trying to develop a face recognition application using OpenCV 2.0
Everything works fine, except there's no IPP support.

I have read that IPP was not supported yet in the pre 2.0 releases of OpenCV, but should be in the official 2.0 one.

So I want to evaluate the IPP 6.1 (I registered for this), but I can't because it doesn't work yet with OpenCV 2.0

I thought that OpenCV was developped by a branch of intel in order to encourage the use of multithreaded intensive apps,
and so to sell more processors, which makes sense. So I'm surprised that the IPP implementation is not a priority for OpenCV.

I tried every kind of linking, static, dynamic, compiling with visual studio's compiler, intel's compiler... nothing works.
(and many people ended up like me trying to link IPP and failed). The IPP libs are detected, but not used by opencv.

I've been trying to make ipp work for opencv 2.0 for one week now... I'm hopeless.

I don't know if it is the right place for this post, so excuse me if it's not, but I have already posted a question about this
on yahougroup's opencv forums and had no answer yet (2 days ago).

Regards,
Franois M.


0 Kudos
9 Replies
Vladimir_Dudnik
Employee
130 Views


Hi Francois,

did you pay attention to specify correct PATH to IPP at OpenCV build configuration time? Note, I've used something like this: C:/Program Files/Intel/Parallel Studio/Composer/ipp/ia32/bin and this work for me.

Regards,
Vladimir
micmac34
Beginner
130 Views


Hi Francois,

did you pay attention to specify correct PATH to IPP at OpenCV build configuration time? Note, I've used something like this: C:/Program Files/Intel/Parallel Studio/Composer/ipp/ia32/bin and this work for me.

Regards,
Vladimir

Hi, thanks for your answer!

The path to the ipp dlls is present in the system PATH ("C:/Program Files (x86)/Intel/IPP/6.1.2.041/ia32/bin"),
and IPP seems to be detected both at the configuration stage (IPP_PATH is set to that bin directory, and I have checked the "USE IPP" parameter too), and at compilation stage (the output states: "IPP detected : TRUE").

The Visual Studio projects generated by CMake-GUI seem to link correctly to the IPP libs (all required merged and emerged libs are specified in the linker input). Besides, the path to those libraries is present in the global options,
as well as the pathes to all the required includes.

So it seems that IPP is detected, statically linked, but when I try something like...

NumUploadedFunction = cvUseOptimized(1);
or
cvGetModuleInfo(0, &opencv_lib,&add_modules);

...I get weird results, like only 1 optimized function loaded, and not any module loaded whatsoever.
I have checked that it is the right dlls that are dispatched at execution time.

I have also read that since 2.0 version, the ipp libs are statically linked and so that those functions could return
wrong results although the ipp works. But I didn't see any improvement at run time in intensive resize, median
filter, and so on...

I am currently on win7 x64, I have checked that no wrong dll from sysWOW64 folder is loaded too.

So I'm stuck. I guess that I may have forgotten something, but what...?

Regards,
Franois

Rob_Ottenhoff
New Contributor I
130 Views

Quoting - micmac34

Hi, thanks for your answer!

The path to the ipp dlls is present in the system PATH ("C:/Program Files (x86)/Intel/IPP/6.1.2.041/ia32/bin"),
and IPP seems to be detected both at the configuration stage (IPP_PATH is set to that bin directory, and I have checked the "USE IPP" parameter too), and at compilation stage (the output states: "IPP detected : TRUE").

The Visual Studio projects generated by CMake-GUI seem to link correctly to the IPP libs (all required merged and emerged libs are specified in the linker input). Besides, the path to those libraries is present in the global options,
as well as the pathes to all the required includes.

So it seems that IPP is detected, statically linked, but when I try something like...

NumUploadedFunction = cvUseOptimized(1);
or
cvGetModuleInfo(0, &opencv_lib,&add_modules);

...I get weird results, like only 1 optimized function loaded, and not any module loaded whatsoever.
I have checked that it is the right dlls that are dispatched at execution time.

I have also read that since 2.0 version, the ipp libs are statically linked and so that those functions could return
wrong results although the ipp works. But I didn't see any improvement at run time in intensive resize, median
filter, and so on...

I am currently on win7 x64, I have checked that no wrong dll from sysWOW64 folder is loaded too.

So I'm stuck. I guess that I may have forgotten something, but what...?

Regards,
Franois

Hi,
I have the same problem, and posted it at the OpenCV forum. The answer was clear: OpenCV2.0 does not support IPP, maybe in a future release. A pity.

Regards,

Rob

micmac34
Beginner
130 Views

Quoting - Rob Ottenhoff
Hi,
I have the same problem, and posted it at the OpenCV forum. The answer was clear: OpenCV2.0 does not support IPP, maybe in a future release. A pity.

Regards,

Rob


Well from what I read, it may be the case that it's not supported yet.

But OpenCV is an open source effort that originated from intel and is more or less supported by them.

So that's true that IPP support is very important for potential professionnal OpenCV users, but until then
the good attitude i guess is to kindly ask the developpers to include such support in the upcoming releases of
OpenCV. That's what I did on the OpenCV forums, and I encourage you to do the same. When many IPP users
kindly ask for IPP support, it will indeed be taken in count (or maybe it is just planned anyways, but asking doesn't
hurt!)

So to the OpenCV / IPP devs: it is nice to keep it open source and to some extent independent from IPP, but
please also mind the professionnal users who will largely benefit from IPP support in OpenCV.

Thanks for your attention, and keep up the good work.

F.Moyson



Vladimir_Dudnik
Employee
130 Views


Hello for OpenCV/IPP users,

Information for those who might be misleaded by OpenCV 2.0 loaded modules report (which does not list IPP DLLs).
Actually, OpenCV 2.0 still supports IPP, the only diffenerence from OpenCV 1.0 is that now it links with IPP static libraries. The default build of OpenCV 2.0 which available from sourceforge does not include IPP libraries, but if you have IPP installed you should be able to configure and rebuild OpenCV to enable link with IPP.

Note, you still need to specify path to IPP DLLs (for example C:Program FilesIntelParallel StudioComposerippia32bin) in CMake configuration tool. This will generate by your choice either Makefiles or MSVC project files (I did test with MS VC2008) and link with IPP static libraries using path like C:Program FilesIntelParallel StudioComposerippia32bin..lib, where IPP static libraries should be located.
A note for those who use Intel Parallel Studio (like I did), you will need to download IPP static libraries which distributed as a separate package to reduce Parallel Studio install package.

Regards,
Vladimir
Rob_Ottenhoff
New Contributor I
130 Views


Hello for OpenCV/IPP users,

Information for those who might be misleaded by OpenCV 2.0 loaded modules report (which does not list IPP DLLs).
Actually, OpenCV 2.0 still supports IPP, the only diffenerence from OpenCV 1.0 is that now it links with IPP static libraries. The default build of OpenCV 2.0 which available from sourceforge does not include IPP libraries, but if you have IPP installed you should be able to configure and rebuild OpenCV to enable link with IPP.

Note, you still need to specify path to IPP DLLs (for example C:Program FilesIntelParallel StudioComposerippia32bin) in CMake configuration tool. This will generate by your choice either Makefiles or MSVC project files (I did test with MS VC2008) and link with IPP static libraries using path like C:Program FilesIntelParallel StudioComposerippia32bin..lib, where IPP static libraries should be located.
A note for those who use Intel Parallel Studio (like I did), you will need to download IPP static libraries which distributed as a separate package to reduce Parallel Studio install package.

Regards,
Vladimir
Hi Vladimir,

You are overly optimistic. It is true that you can build OpenCV2.0 with the IPP libraries statically linked. The trouble is that hardly any IPP functions are called. Search for the HAVE_IPP macro in the OpenCV2.0 source and you will see that only a few color conversions and some dxt functions are used.

Regards,

Rob
Vladimir_Dudnik
Employee
130 Views

Ops, I did not realize that.I know fromOpenCV developers that they plan to extend IPP support in some nearest update. May need to check when exactly they plan to add this.

Vladimir
Vladimir_Dudnik
Employee
130 Views

Hello,

would like to notify everyone that OpenCV 2.1 was just recently released. It support build with IPP static libraries.

Make sure you configure OpenCV correctly in order to build it with IPP support. The picture below show configuration options which work for me (I have IPP and TBB installed as a part of Intel Parallel Studio). Note, IPP_PATH should point to the folder where IPP DLLs are located (seems to be historical)



Regards,
Vladimir
Ying_H_Intel
Employee
130 Views

Reply