- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No idea of why it is so.
I followed the building procedures in /doc/Getting_Started.htm
Building Procedures
Follow the steps below to build your application using the Intel IPP shared object finding libraries:
-
- Note: You must link the ippcore functions statically (using libippcore.a)
- Call ippStaticInitBest() instead to turn off the shared object finding feature (always uses statically linked code)
- Calling ippStaticFree() releases the resources used by ippStaticInit(), and then calls the ippStaticInitBest() function
- Include ipp.h, libippcore.a, and the appropriate libipp**emerged.a file(s) to your project and build tree.
- Make sure the appropriate libipp**merged.a file(s) are in your build tree
- Call ippStaticInit() before calling other Intel IPP functions
- Call the Intel IPP functions required in your application source code
I added libippcore.a, and I succeeded in compiling my code, but failed to link.
#include
#include
#include
#include
int main(int,char**)
{
IppStatus status = ippStaticInit();
const int M=3;
IppiSize msz={M,M}; IppiPoint ma={M/2,M/2};
IplImage* img=cvLoadImage("/usr/local/share/opencv/samples/c/lena.jpg",1);
IplImage* med1=cvCreateImage(cvGetSize(img),8,3);
IplImage* med2=cvCloneImage(med1);
int64 t0 = cvGetTickCount(),t1,t2;
IppiSize sz = {img->width-M+1,img->height-M+1};
double isz=1./(img->width*img->height);
cvSmooth(img,med1,CV_MEDIAN,M); // use IPP via OpenCV interface
t0=cvGetTickCount()-t0;
cvUseOptimized(0); // unload IPP
t1 = cvGetTickCount();
cvSmooth(img,med1,CV_MEDIAN,M); // use C code
t1=cvGetTickCount()-t1;
t2=cvGetTickCount();
ippiFilterMedian_8u_C3R( // use IPP directly
&CV_IMAGE_ELEM(img,uchar,M/2,M/2*3), img->widthStep,
&CV_IMAGE_ELEM(med1,uchar,M/2,M/2*3), med1->widthStep, sz, msz, ma );
t2=cvGetTickCount()-t2;
printf("t0=%.2f, t1=%.2f, t2=%.2f\n", (double)t0*isz,(double)t1*isz,(double)t2*isz);
return 0;
}
Seriously have no idea which static libipp**merged.a should be added for link. I was considering why I can't dynamically link those .so files???
Why IPP is so hard to use?
Anyway, can anybody give me a clue?
Thank you very much.
Best Regards
JIA
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally, I made IPP work. It's seriously inconvenient I think.
Unlike OpenCV, just add some .so dynamic libraries for linking, it works.
For IPP, you must follow http://software.intel.com/en-us/forums/showpost.php?p=64060
I can't link the dynamic libraries, but I have to link the static ".a" libraries instead. No idea of why it is so.
Besides, the libraries should be linked according to a specific sequence as suggested in the above link. This is really inconvenient.
Anyway, it's working now. I just hope it really brings the efficiency at the cost of inconvenience.
Best Regards
JIA Pei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page