OpenCV linemod不是cv成员

时间:2015-07-21 11:44:22

标签: opencv compiler-errors ros

我尝试为棋盘检测和相对位置安装ROS indigojsk_recognitionopencv-3.0.0-rc1 Ubuntu 14.04 catkin_make。当我尝试 [ 73%] Building CXX object vision/jsk_recognition-master/jsk_perception/CMakeFiles/roi_to_mask_image.dir/roi_to_mask_image.cpp.o /home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:57: error: ‘linemod’ is not a member of ‘cv’ std::vector<CvPoint> maskFromTemplate(const std::vector<cv::linemod::Template>& templates, ^ /home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:57: error: ‘linemod’ is not a member of ‘cv’ /home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:78: error: template argument 1 is invalid std::vector<CvPoint> maskFromTemplate(const std::vector<cv::linemod::Template>& templates, ^ /home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:78: error: template argument 2 is invalid /home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_perception/src/linemod.cpp:69:57: error: ‘linemod’ is not a member of ‘cv’ std::vector<CvPoint> maskFromTemplate(const std::vector<cv::linemod::Template>& templates, 我收到构建错误的包时,退出很多,完整的报告是here,但它开始如下:

linemod

问题与linemod.h类接触,在联机opencv文档中存在但在我的情况下编译器无法识别它。 ./home/elod/catkin_ws/src/vision/jsk_recognition-master/jsk_pcl_ros/include/jsk_pcl_ros/linemod.h ./opt/ros/indigo/include/jsk_pcl_ros/linemod.h ./usr/include/pcl-1.7/pcl/recognition/linemod.h 头文件只能在以下任何opencv文件夹中找到:

Opencv 2.4.11

这个模块是否缺少我的OpenCV安装或为什么无法在cv命名空间中找到它?

在我的旧3.0.0(已卸载)接缝中包含此模块,但我已将所有内容迁移到cvSnakeImage

任何想法如何解决?

更新 一个非常重要的观察是上面提到的pkg是针对Opencv2.4而我使用的是3.0!有些东西被移出或移除了新版本,如cvSnakeImage,这也出现在这个pkg中。

另一个问题是:如何替换textarea:focus { resize: vertical; } 或替换可以替换的内容?

1 个答案:

答案 0 :(得分:0)

Did you build from scratch (clean build directory) ?

You could try adding cv:: namespace into *.hpp

-<linemod::Match>
+<cv::linemod::Match>

And/or try adding "#include <opencv2/rgbd/linemod.hpp>" into the same file.