openCV (cvAlloc) fail to locate memory

asked 2013-03-11 12:18:40 -0500

updated 2013-03-12 07:10:01 -0500

I am developing Android face recognition using eclipse with native C. However, Eclipse mark

faceImgArr = (IplImage **)cvAlloc( nFaces*sizeof(IplImage *) );

as bug with the error message Invalid arguments 'Candidates are:void * cvAlloc(unsigned long int)'. image description

I had did lot of research but there is no any solution. Anyone can help me on this issue?

edit retag flag offensive close merge delete

Comments

1

Is stand alone ndk-build successful? There were some problems with C++ parser in Eclipse that marks valid code as error. Try to simplify your code string and fix possible type conversion issues.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-03-12 07:14:29 -0500 )edit

What is mean by stand alone ndk-build successful? I tried commented all the error code and Eclipse compile it fine. I guess is conversion issue but I saw a lot of researchers using this code to do their research. Here's the link: http://pebibyte.wordpress.com/2011/01/21/simple-face-recognition-using-opencv/

WoeiChyuan gravatar imageWoeiChyuan ( 2013-03-12 09:05:28 -0500 )edit

You can run ndk-build from console without Eclipse. If ndk-build is fine, then it is Eclipse C++ code parser issue. Also, try to add explicit type conversion to be compliant with function signature.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-03-12 11:31:46 -0500 )edit