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

IPP and OpenCV crashing.

leos
Beginner
471 Views
Hi,

We're are working on an application that will do some real-time image processing using OpenCV. It works fine with OpenCV, but then I installed IPP and every call to an OpenCV functions causes the program to crash.

I have the latest OpenCV, and the latest evaluation version of IPP on Windows XP SP2, on an Intel P4 1.7GHz.

The error signature given by the windows crash handler is:
AppName: opencvtest.exe AppVer: 0.0.0.0 ModName: ippcvw7.dll
ModVer: 4.1.10.72 Offset: 0004e4c8

The debugger says: Unhandled exception in OpenCVTest.exe (IPPCVW7.DLL): 0xC0000005: Access Violation

Anyone know what the problem could be?
It crashes on the line:
cvMinMaxLoc(img2, &minValue, &maxValue);

It seems to crash on most cv functions, not specifically that one.
But the OpenCV code is not the problem, since it runs fine without IPP installed.

Any help is greatly appreciated.
0 Kudos
3 Replies
leos
Beginner
471 Views
Just some followup. Stepping through my code in debug mode, it goes into the OpenCV function cvMinMaxLoc and hits this line:

IPPI_CALL( func( mat->data.ptr, mat_step, size,
minVal, maxVal, minLoc, maxLoc ));

then jumps to:

ICV_DEF_MINMAXLOC_ALL( 8u, uchar, int, float )

At which point the exception occurs on the line:

00C4E4C8 mov dword ptr [edi],ebx

in ippcvw7.dll
0 Kudos
Vladimir_Dudnik
Employee
471 Views

Hi, there is comment from our expert:

It is known problem that is fixed in the current CVS version of OpenCV.

ippiMinMaxIndx_***, called from cvMinMaxLoc, crashes when some of output pointers are NULL.

To avoid the problem with OpenCV beta 3.1 or beta 4, pass all the output pointers to cvMinMaxLoc.

E.g.

CvPoint minLoc, maxLoc;
double minValue, maxValue;
cvMinMaxLoc( img2, &minValue, &maxValue, &minLoc, &maxLoc );

It wont affect the function performance.

Regards,
Vladimir

0 Kudos
leos
Beginner
471 Views
Ah. Thank you very much. That fixed it. I was wrong when I said that other cv functions cause it to crash too, it was just that one.

The support on this forum is excellent!
0 Kudos
Reply