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

Intel IPP with Open CV 2.2

itaictrueltd_com
Beginner
691 Views
Hi,

I am currently trying to develop a face recognition application using OpenCV 2.2 and IPP 7.0
Everything works fine, except there's no IPP support.
i'm using the CMake 2.8.3 as shown in the example in this link :

http://software.intel.com/en-us/articles/intel-ipp-support-model-changed-in-opencv-2x/

but the preformance stays the same , i'm using the transpose functions so it should be better.

this the path i'm using for in the cmake :

C:\\Program Files\\Intel\\ComposerXE-2011\\ipp\\bin\\ia32

and the Intel Processor is Atom d510 with board AIMB-212D S6A1E - Advantech
with openCV 1.0 we have a very good preformance optimization on this processor.


33919-Cmake_openCV.JPG


does anyone know what should make it work ?

thank you

0 Kudos
9 Replies
Vladimir_Dudnik
Employee
691 Views
Hello,

As you use Visual Studio 2010 project generator in CMake, you should be able to check in OpenCV project settings if the path to IPP header files and library files was generated correctly.

If everything is OK, you may also want to check in debugger if program execution path go to IPP call. Please look for ippiApplyHaarClassifier_32f_C1R function call in modules\objdetect\src\haar.cpp file, line 872 - it isthe place where you may want to set break point to ensure execution go to this point.

Regards,
Vladimir
0 Kudos
itaictrueltd_com
Beginner
691 Views
thanks for the quick answer,
meanwhile i found that i need to use the intel64 IPP Dll's
i try to compile the openCV the same as before and i used the Following paramteres in cmake :



when i compiled with this parameters i got 31 compilation errors .

i also look in this thread :

http://software.intel.com/en-us/forums/showthread.php?t=79355

so i change the CMAKE Txt file as followed in order to make it compiled but without success for now.


do you familiar with these issues ? ( the ia32 version was compiled successfully)

more details about the compilation errors from the VS 2010

Creating library C:/OpenCV2.2_ipp7.0/lib/Release/opencv_core220.lib and object C:/OpenCV2.2_ipp7.0/lib/Release/opencv_core220.exp
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFwd_CToC_32fc@16 referenced in function "void __cdecl cv::ippsDFTFwd_CToC(class cv::Complex const *,class cv::Complex *,void const *,unsigned char *)" (?ippsDFTFwd_CToC@cv@@YAXPBV?$Complex@M@1@PAV21@PBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFwd_CToC_64fc@16 referenced in function "void __cdecl cv::ippsDFTFwd_CToC(class cv::Complex const *,class cv::Complex *,void const *,unsigned char *)" (?ippsDFTFwd_CToC@cv@@YAXPBV?$Complex@N@1@PAV21@PBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInv_CToC_32fc@16 referenced in function "void __cdecl cv::ippsDFTInv_CToC(class cv::Complex const *,class cv::Complex *,void const *,unsigned char *)" (?ippsDFTInv_CToC@cv@@YAXPBV?$Complex@M@1@PAV21@PBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInv_CToC_64fc@16 referenced in function "void __cdecl cv::ippsDFTInv_CToC(class cv::Complex const *,class cv::Complex *,void const *,unsigned char *)" (?ippsDFTInv_CToC@cv@@YAXPBV?$Complex@N@1@PAV21@PBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFwd_RToPack_32f@16 referenced in function "void __cdecl cv::ippsDFTFwd_RToPack(float const *,float *,void const *,unsigned char *)" (?ippsDFTFwd_RToPack@cv@@YAXPBMPAMPBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFwd_RToPack_64f@16 referenced in function "void __cdecl cv::ippsDFTFwd_RToPack(double const *,double *,void const *,unsigned char *)" (?ippsDFTFwd_RToPack@cv@@YAXPBNPANPBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInv_PackToR_32f@16 referenced in function "void __cdecl cv::ippsDFTInv_PackToR(float const *,float *,void const *,unsigned char *)" (?ippsDFTInv_PackToR@cv@@YAXPBMPAMPBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInv_PackToR_64f@16 referenced in function "void __cdecl cv::ippsDFTInv_PackToR(double const *,double *,void const *,unsigned char *)" (?ippsDFTInv_PackToR@cv@@YAXPBNPANPBXPAE@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTGetBufSize_C_64fc@8 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInitAlloc_C_64fc@16 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFree_C_64fc@4 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTGetBufSize_C_32fc@8 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInitAlloc_C_32fc@16 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFree_C_32fc@4 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTGetBufSize_R_64f@8 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInitAlloc_R_64f@16 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFree_R_64f@4 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTGetBufSize_R_32f@8 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTInitAlloc_R_32f@16 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>dxt.obj : error LNK2019: unresolved external symbol _ippsDFTFree_R_32f@4 referenced in function "void __cdecl cv::dft(class cv::Mat const &,class cv::Mat &,int,int)" (?dft@cv@@YAXABVMat@1@AAV21@HH@Z)
10>mathfuncs.obj : error LNK2019: unresolved external symbol _ippsExp_64f_A50@12 referenced in function "void __cdecl cv::exp(class cv::Mat const &,class cv::Mat &)" (?exp@cv@@YAXABVMat@1@AAV21@@Z)
10>mathfuncs.obj : error LNK2019: unresolved external symbol _ippsExp_32f_A21@12 referenced in function "void __cdecl cv::exp(class cv::Mat const &,class cv::Mat &)" (?exp@cv@@YAXABVMat@1@AAV21@@Z)
10>mathfuncs.obj : error LNK2019: unresolved external symbol _ippsLn_64f_A50@12 referenced in function "void __cdecl cv::log(class cv::Mat const &,class cv::Mat &)" (?log@cv@@YAXABVMat@1@AAV21@@Z)
10>mathfuncs.obj : error LNK2019: unresolved external symbol _ippsLn_32f_A21@12 referenced in function "void __cdecl cv::log(class cv::Mat const &,class cv::Mat &)" (?log@cv@@YAXABVMat@1@AAV21@@Z)
10>system.obj : error LNK2019: unresolved external symbol _ippStaticInit@0 referenced in function "public: __thiscall cv::IPPInitializer::IPPInitializer(void)" (??0IPPInitializer@cv@@QAE@XZ)
10>C:\OpenCV2.2_ipp7.0\bin\Release\opencv_core220.dll : fatal error LNK1120: 25 unresolved externals

0 Kudos
Vladimir_Dudnik
Employee
691 Views
The linker error reports on unresolved symbols which mean it was not able to find appropriate libraries to resolve these symbols. Please check that VC2010 project linker settings are correct and there is right path to IPP static libraries (OpenCV 2.x use IPP static libraries)

Vladimir
0 Kudos
itaictrueltd_com
Beginner
691 Views
Dear Vladimir,
these are the libs that are in the linker "additional library directories" :

C:/Program Files/Intel/ComposerXE-2011/ipp/bin/intel64/../../lib/intel64;
C:/Program Files/Intel/ComposerXE-2011/ipp/bin/intel64/../../lib/intel64/$(Configuration);

they seems right and added automatically with the cmake

i also added this one :

C:\Program Files\Intel\ComposerXE-2011\ipp\lib\intel64;

does i need to add additional locations ?

do you know what should be the cmake IPP Section for windows xp VC2010 ?

thanks
itai
0 Kudos
Vladimir_Dudnik
Employee
691 Views

Your path seems to be right, I have the same location of IPP in my copy of ComposerXE-2011. Please check that library names in your link settings correspond to new naming convention we did in IPP 7.0. Remember, in IPP 6.x and earlier, names of static libraries look like ippsmergedem64t.lib and ippsemergedem64t.lib. Starting from IPP 7.0 we use more consistent and convenient naming scheme - you now need only one library per IPP functional domain, like for signal processing you will need ipps_l.lib (in both 32-bit and 64-bit environments).

Vladimir

0 Kudos
itaictrueltd_com
Beginner
691 Views
Dear Vladimir,

these are the libraries in the "additional dependencies" :

kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib;

ippvm_l.lib;ippcc_l.lib;ippcv_l.lib;ippi_l.lib;ipps_l.lib;ippcore_l.lib;

..\..\3rdparty\lib\Release\opencv_lapack.lib;

..\..\3rdparty\lib\Release\zlib.lib

this look like the new naming convention .
0 Kudos
Vladimir_Dudnik
Employee
691 Views

Look like everything is correct...

And you have re-generated VC2010 projectstox64 target?

I'm really have no other ideas what might be wrong here...

Vladimir

0 Kudos
itaictrueltd_com
Beginner
691 Views
Dear Vladimir,
i first compiled it as x86 , than i change it to x64 and i got some others linking errors.
but i think there is some critical issue about my understanding of the IPP libraries.
the x86 x64 refers to the operating system the application will run on windows xp 64 bit (x64) or windows xp 32 bit (x86).

i thought that the intel64 refers to the Processor type and not to the OS. we are using ATOM d510 which support intel64 technology.

and again the IPP of IA32 is working and the Intel64 not,
does the intel64 means that i need to work in 64 bit OS ?

thanks
0 Kudos
Vladimir_Dudnik
Employee
691 Views
Well,

32-bit application linked with IPP libraries for IA32 processors can run on both 32-bit and 64-bit OS.

64-bit application linked with IPP libraries for Intel64 processors can run on 64-bit OS only.

And finally, you can't mix 32-bit libraries in 64-bit application and vice verse.

Vladimir
0 Kudos
Reply