OpenCV: "AlgorithmInfo does not name the type when creating opencv_contrib

I am getting the following error when trying to build opencv using contrib module

/opencv/opencv_contrib/modules/tracking/include/opencv2/tracking/tracker.hpp:577:11: error: ‘AlgorithmInfo’ does not name a type

      

The last code and pulled out just now. After adding a forward declaration class AlgorithmInfo;

to the tracker.hpp file, this particular error was gone, but I get another error 'AlgorithmInfo does not name the type of error in other files. Probably AlgorithmInfo hasn't come in for a while. Any ideas?

Study:

  • After grepping AlgorithmInfo, I found that there is no defination of AlgorithmInfo in the code base.

  • Compared to the previous version of the code, I found that AlgorithmInfo is defined on opencv2 / core.hpp line 3006. But in the last code it is not there at all!

+3


source to share


1 answer


This is not a permanent solution, but I had the same problem and this is how I was able to keep working on the project until someone found a better way.

I looked at the link that Utkarsh posted How to use SIFT in OpenCV 3.0 using C ++?

To summarize, I had to get the opecv_contrib repo and redo opencv.

After that I got the same error anyway and eventually realized that you should include



#include "opencv2/xfeatures2d.hpp"
#include "opencv2/features2d/features2d.hpp"

      

but you still get the same unless you also delete / comment

//#include "opencv2/nonfree/features2d.hpp"
//#include "opencv2/nonfree/nonfree.hpp"

      

Anyway, this is how I got around this error for a while.

0


source







All Articles