views:

241

answers:

0

I am trying to run the OpenSURF code(used for point matching) obtained from the following website: http://www.chrisevansdev.com/computer-vision-opensurf.html

This codebase uses OpenCV library(which is already installed on my computer) and I have included its path in the Environemtal variables.

However, when I try to build the OpenSURF project in Netbeans IDE 6.8(using cygwin compiler), I get a host of errors as follows:

In file included from fasthessian.cpp:12:
integral.h:26:16: cv.h: No such file or directory
In file included from fasthessian.cpp:12:
integral.h:30: error: expected constructor, destructor, or type conversion before '*' token
integral.h:30: error: expected `,' or `;' before '*' token
integral.h:35: error: `BoxIntegral' declared as an `inline' variable
integral.h:35: error: `IplImage' was not declared in this scope
integral.h:35: error: `img' was not declared in this scope
integral.h:35: error: expected primary-expression before "int"
integral.h:35: error: expected primary-expression before "int"
integral.h:35: error: expected primary-expression before "int"
integral.h:35: error: expected primary-expression before "int"
integral.h:36: error: initializer expression list treated as compound expression
integral.h:36: error: expected `,' or `;' before '{' token
integral.h:55:7: warning: no newline at end of file
In file included from fasthessian.cpp:13:
ipoint.h:28: error: expected `,' or `...' before "src_corners"
ipoint.h:28: error: ISO C++ forbids declaration of `CvPoint' with no type
In file included from fasthessian.cpp:14:
utils.h:25: error: expected `,' or `...' before '*' token
utils.h:25: error: ISO C++ forbids declaration of `IplImage' with no type
utils.h:28: error: expected `,' or `...' before '*' token
utils.h:28: error: ISO C++ forbids declaration of `IplImage' with no type
utils.h:31: error: expected constructor, destructor, or type conversion before '*' token
utils.h:31: error: expected `,' or `;' before '*' token
utils.h:34: error: variable or field `drawIpoint' declared void
utils.h:34: error: `IplImage' was not declared in this scope
utils.h:34: error: `img' was not declared in this scope
utils.h:34: error: expected primary-expression before '&' token
utils.h:34: error: `ipt' was not declared in this scope
utils.h:34: error: expected primary-expression before "int"
utils.h:34: error: initializer expression list treated as compound expression
utils.h:37: error: variable or field `drawIpoints' declared void
utils.h:37: error: `IplImage' was not declared in this scope
utils.h:37: error: `img' was not declared in this scope
utils.h:37: error: expected primary-expression before '&' token
utils.h:37: error: `ipts' was not declared in this scope
utils.h:37: error: expected primary-expression before "int"
utils.h:37: error: initializer expression list treated as compound expression
utils.h:40: error: variable or field `drawWindows' declared void
utils.h:40: error: `IplImage' was not declared in this scope
utils.h:40: error: `img' was not declared in this scope
utils.h:40: error: expected primary-expression before '&' token
utils.h:40: error: `ipts' was not declared in this scope
utils.h:40: error: initializer expression list treated as compound expression
utils.h:43: error: variable or field `drawFPS' declared void
utils.h:43: error: `IplImage' was not declared in this scope
utils.h:43: error: `img' was not declared in this scope
utils.h:46: error: variable or field `drawPoint' declared void
utils.h:46: error: `IplImage' was not declared in this scope
utils.h:46: error: `img' was not declared in this scope
utils.h:46: error: expected primary-expression before '&' token
utils.h:46: error: `ipt' was not declared in this scope
utils.h:46: error: initializer expression list treated as compound expression
utils.h:49: error: variable or field `drawPoints' declared void
utils.h:49: error: `IplImage' was not declared in this scope
utils.h:49: error: `img' was not declared in this scope
utils.h:49: error: expected primary-expression before '&' token
utils.h:49: error: `ipts' was not declared in this scope
utils.h:49: error: initializer expression list treated as compound expression
In file included from fasthessian.cpp:19:
fasthessian.h:39: error: expected `)' before '*' token
fasthessian.h:56: error: `IplImage' has not been declared
fasthessian.h:56: error: ISO C++ forbids declaration of `img' with no type
fasthessian.h:78: error: ISO C++ forbids declaration of `CvMat' with no type
fasthessian.h:78: error: expected `;' before '*' token
fasthessian.h:79: error: ISO C++ forbids declaration of `CvMat' with no type
fasthessian.h:79: error: expected `;' before '*' token
fasthessian.h:84: error: ISO C++ forbids declaration of `IplImage' with no type
fasthessian.h:84: error: expected `;' before '*' token
In file included from fasthessian.cpp:19:
fasthessian.h:107:7: warning: no newline at end of file
fasthessian.h: In constructor `FastHessian::FastHessian(std::vector<Ipoint, std::allocator<Ipoint> >&, int, int, int, float)':
fasthessian.h:88: warning: `FastHessian::ipts' will be initialized after
fasthessian.h:85: warning:   `int FastHessian::i_width'
fasthessian.cpp:32: warning:   when initialized here
fasthessian.cpp: At global scope:
fasthessian.cpp:40: error: expected `)' before '*' token
fasthessian.cpp:40: error: expected `,' or `;' before '*' token
fasthessian.cpp:82: error: variable or field `setIntImage' declared void
fasthessian.cpp:82: error: `int FastHessian::setIntImage' is not a static member of `class FastHessian'
fasthessian.cpp:82: error: `IplImage' was not declared in this scope
fasthessian.cpp:82: error: `img' was not declared in this scope
fasthessian.cpp:83: error: expected `,' or `;' before '{' token
fasthessian.cpp: In member function `void FastHessian::buildResponseLayer(ResponseLayer*)':
fasthessian.cpp:213: error: `img' undeclared (first use this function)
fasthessian.cpp:213: error: (Each undeclared identifier is reported only once for each function it appears in.)
fasthessian.cpp:213: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp:214: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp:215: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp:216: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp:217: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp:218: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp:219: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp:220: error: `BoxIntegral' cannot be used as a function
fasthessian.cpp: In member function `void FastHessian::interpolateStep(int, int, ResponseLayer*, ResponseLayer*, ResponseLayer*, double*, double*, double*)':
fasthessian.cpp:303: error: `CvMat' undeclared (first use this function)
fasthessian.cpp:303: error: `dD' undeclared (first use this function)
fasthessian.cpp:303: error: `H' undeclared (first use this function)
fasthessian.cpp:303: error: `H_inv' undeclared (first use this function)
fasthessian.cpp:303: error: `X' undeclared (first use this function)
fasthessian.cpp:306: error: `deriv3D' undeclared (first use this function)
fasthessian.cpp:307: error: `hessian3D' undeclared (first use this function)
fasthessian.cpp:308: error: `CV_64FC1' undeclared (first use this function)
fasthessian.cpp:308: error: `cvCreateMat' undeclared (first use this function)
fasthessian.cpp:309: error: `CV_SVD' undeclared (first use this function)
fasthessian.cpp:309: error: `cvInvert' undeclared (first use this function)
fasthessian.cpp:310: error: `CV_AUTOSTEP' undeclared (first use this function)
fasthessian.cpp:310: error: `cvInitMatHeader' undeclared (first use this function)
fasthessian.cpp:311: error: `cvGEMM' undeclared (first use this function)
fasthessian.cpp:313: error: `cvReleaseMat' undeclared (first use this function)
fasthessian.cpp: At global scope:
fasthessian.cpp:325: error: expected constructor, destructor, or type conversion before '*' token
fasthessian.cpp:325: error: expected `,' or `;' before '*' token
fasthessian.cpp:345: error: expected constructor, destructor, or type conversion before '*' token
fasthessian.cpp:345: error: expected `,' or `;' before '*' token
fasthessian.cpp:375:58: warning: no newline at end of file

Please note that I have included the path of the necessary include files in the OpenCV folder in Netbeans IDE using the following method:

Tools->Options->Click C/C++ tab->Click Code Assistance Tab->added

  1. C:\Program Files\OpenCV\cv\include

  2. C:\Program Files\OpenCV\cvaux\include

  3. C:\Program Files\OpenCV\cxcore\include

  4. other cygwin include files

In addition, I also tried to run it at the cygwin command prompt but I get the same set of errors.I would be really thankful if anybody could help me with my problem.