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

IPP/OPENCV Performance

m_forster
Beginner
497 Views
I'm facing the problem that my OPENCV test program ist much slower with the IPP modules loaded than without. I have no clue what's going on there.
I check the modules using getModuleInfo() and it seems to be alright.

Any suggestions ??

Thx, MFO
0 Kudos
4 Replies
Vladimir_Dudnik
Employee
497 Views

Only one suggestion - could you please provide detailed info what kind of platform do you use (processor, OS, compiler), what version of IPP and OpenCV libraries do you use. What your test program do exactly, which functions does it call, how many data does it process? It also would be nice if you can attach the test sample here.

Regards,
Vladimir

0 Kudos
m_forster
Beginner
497 Views
Sure ...

IPP 5.2 and OPENCV 1.0.0
CPU: Intel Core 2 Quad
OS: Fedora Core 7
Compiler: gcc4.2

The sample looks like this:

#include
#include
#include

#include "FrameworkTime.h"

#include "boost/shared_ptr.hpp"
using boost::shared_ptr;

#include

int main()
{
FrameworkTime::TimeStamp time1;
FrameworkTime::TimeStamp time2;

const char* opencv_libraries = 0;
const char* addon_modules = 0;
cvGetModuleInfo( 0, &opencv_libraries, &addon_modules );
printf( "OpenCV: %s Add-on Modules: %s ", opencv_libraries, addon_modules );

IplImage* img = cvLoadImage("20050211142625000.jpg", CV_LOAD_IMAGE_GRAYSCALE);
IplImage* sobel = cvCreateImage(cvSize(img->width, img->height), 8, 1);
IplImage* canny = cvCreateImage(cvSize(img->width, img->height), 8, 1);

//cvNamedWindow("original",1);
cvNamedWindow("sobel",1);
cvNamedWindow("canny",1);

time1.setCurrentTime();

cvSobel(img, sobel, 1, 1);
cvCanny(img, canny, 50.0, 100.0);

time2.setCurrentTime();
std::cout << "Algorithm took " << (time2-time1) << "usec" << std::endl;

//cvShowImage("original",img);
cvShowImage("sobel",sobel);
cvShowImage("canny",canny);
cvWaitKey(20000);

cvReleaseImage(&img);
cvReleaseImage(&sobel);
cvReleaseImage(&canny);

cvDestroyWindow("test");

return 0;
}
0 Kudos
aneeska
Beginner
497 Views
Hi Vladimir,

I have tried using openCV and IPP together. But I am not getting any performance boost at all. I am attaching my system info as was reported by one of the tools that came with IPP - ps_ippcv.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CPU Intel Pentium 4 processor with SSE3 2x2800 MHz L1=8/12K L2=1024K
OS Linux


Computer localhost.localdomain


Library libippcvt7.so.5.3 5.3 Update 2 build 85.21 02/17/08
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

IPP -> intel-ipp53068_ia32-5.3p-068
openCV -> opencv-1.0.0-3.fc7

The test program I ran was the sample facedetection program that comes with openCV. I ran facedetection on live video which is captured by a web cam whose pics are of size 360 x 270 pixels. Approximately processing each frame takes 100 ms with and with out IPP. (I used 'cvGetModuleInfo' to make sure that IPP is available to openCV).

I am waiting for your suggestions.

Regards
-- anees
0 Kudos
Vladimir_Dudnik
Employee
497 Views

TheIPP face detection functions were designed to utilize threading and so there is some difference in approach which used in OpenCV. There are two questions actually,

1. New IPP functions are required to cover OpenCV usage model

2. Experience is needed to use IPP face detection functions, you may take a look on IPP face detection sample. Its performance depends on set of parameters which should reflect expected face size. When parameters are choosen appropriately there is noticeable improvement in performance.

Regards,
Vladimir

0 Kudos
Reply