Hello,
I just built IPP 7.0.7.319_ia32 as a fresh, followed by OpenCV-2.4.2. During the compilation of OpenCV, when I turned the "USE IPP" as "ON", it can automatically detect the location of IPP. Then I tried compiling one simple ipp code with CMake and it gives me this error:
=========================================
Make Error at CMakeLists.txt:8 (FIND_PACKAGE):
Could not find module FindIPP.cmake or a configuration file for package
IPP.
Adjust CMAKE_MODULE_PATH to find FindIPP.cmake or set IPP_DIR to the
directory containing a CMake configuration file for IPP. The file will
have one of the following names:
IPPConfig.cmake
ipp-config.cmake
=========================================
I run "locate IPPConfig.cmake" and "locate ipp-config.cmake" in the terminal, but it gives nothing, seems like there is no such file. My CMakeLists.txt is as follows:
=========================================
cmake_minimum_required(VERSION 2.4)
PROJECT( TestIPP)
FIND_PACKAGE( OpenCV REQUIRED )
FIND_PACKAGE (IPP REQUIRED )
if (IPP_FOUND)
add_definitions ( -DHAVE_IPP)
include_directories ( ${IPP_INCLUDE_DIRS} )
link_directories ( $ { IPP_LIBRARY_DIRS } )
set ( OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${IPP_LIBRARIES} )
endif()
ADD_EXECUTABLE( TestIPP TestIPP.c )
TARGET_LINK_LIBRARIES( TestIPP ${OpenCV_LIBS} ${IPP_SAMPLEROOT} )
=========================================
The simple test code "TestIPP.c", which is found on the internet, is as follows:
=========================================
#include "cv.h"
#include "highgui.h"
#include "ipp.h"
#include "stdio.h"
char name[] = "images/1.jpeg";
int main ()
{
Ipp8u *gray = NULL;
IppiSize size;
IplImage* img = NULL;
CvSize sizeImg;
int i=0, j=0;
size.width = 640;
size.height = 480;
gray = (Ipp8u *) ippsMalloc_8u( size.width * size.height );
for ( i=0; i< size.height; i++)
{
for (j=0; j {
*(gray+i*size.width+j)= (Ipp8u) abs (255*cos((Ipp32f) (i*j)));
}
}
sizeImg.width = size.width;
sizeImg.height = size.height;
img = cvCreateImage ( sizeImg, 8, 1 );
cvSetImageData ( img, gray, sizeImg.width );
cvNamedWindow ( "image", 0 );
cvShowImage ( "image", img) ;
cvWaitKey (0);
cvDestroyWindow ( "image" );
ippsFree ( gray );
img->imageData = NULL;
cvReleaseImage ( & img );
return ( 0 );
}
=========================================
Could someone help me explain this?
By the way, I use Ubuntu 10.04 LTS Lucid 32 bit, with CMake 2.8.0.
Many thanks in advance.
Ederman


