我已经在计算机上安装了OpenCV和opencv_bridge
。我正在尝试在ROS软件包中使用此脚本:
https://github.com/spillai/recognition-utils/blob/master/FLAIR/flair.hpp
问题在于,当我将其包含在文件中时(如下所示):
#include "opencv2/core/version.hpp"
#include "flair.hpp"
我收到此错误:
/home/osboxes/catkin_ws/src/cipek/src/flair.hpp:71:11: error: ‘DescriptorMatcher’ was not declared in this scope
cv::Ptr<DescriptorMatcher> _matcher;
此错误后面还有很多错误,但是我不想把所有错误都放在这里,因为它很长,除非有人需要它。我还没有修改GitHub存储库中的文件。如何解决此问题?
编辑
添加后:
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
对于flair.hpp
文件,出现此错误:
In file included from /usr/local/include/opencv2/core.hpp:52:0,
from /home/osboxes/catkin_ws/src/cipek/src/flair.hpp:23,
from /home/osboxes/catkin_ws/src/cipek/src/ardrone_test_CPP.cpp:8:
/usr/local/include/opencv2/core/cvdef.h:234:15: error: redefinition of ‘union Cv32suf’
typedef union Cv32suf