OpenCV 3.1.0: /usr/local/include/opencv2/legacy/legacy.hpp 无法编译
OpenCV 3.1.0: /usr/local/include/opencv2/legacy/legacy.hpp can't compile
我遇到了很多错误,例如
/usr/local/include/opencv2/legacy/legacy.hpp:2994:12: error: 'CvSubdiv2DEdge' does not name a type
/usr/local/include/opencv2/legacy/legacy.hpp:3002:12: error: 'CvSubdiv2DPoint' does not name a type
/usr/local/include/opencv2/legacy/legacy.hpp:1757:36: error: 'cv::EM' has not been declared
使用 OpenCV 2.4.13 编译得很好。看起来他们实际上忘记了将一些必要的包含添加到 legacy.hpp 中。怎么回事?
抱歉造成误导,但标准设置中实际上没有这样的 header。我的设置与另一个旧版本的 opencv 混合在一起,它没有打包到 deb 文件中,只是 /usr/local/ 中的一堆文件。有趣的是,这是一个全新的安装。
从头开始重新安装 OpenCV 并删除那些旧文件后,错误更改为 legacy.hpp 丢失 - 这正是此处所需要的。
证明如下:http://answers.opencv.org/question/42622/opencv-30-deprecated-opencv_legacy-module/。此外,来自 OpenCV 转换指南:"legacy, nonfree modules have been removed. Some algorithms have been moved to different locations and some have been completely rewritten or removed."
我遇到了很多错误,例如
/usr/local/include/opencv2/legacy/legacy.hpp:2994:12: error: 'CvSubdiv2DEdge' does not name a type
/usr/local/include/opencv2/legacy/legacy.hpp:3002:12: error: 'CvSubdiv2DPoint' does not name a type
/usr/local/include/opencv2/legacy/legacy.hpp:1757:36: error: 'cv::EM' has not been declared
使用 OpenCV 2.4.13 编译得很好。看起来他们实际上忘记了将一些必要的包含添加到 legacy.hpp 中。怎么回事?
抱歉造成误导,但标准设置中实际上没有这样的 header。我的设置与另一个旧版本的 opencv 混合在一起,它没有打包到 deb 文件中,只是 /usr/local/ 中的一堆文件。有趣的是,这是一个全新的安装。
从头开始重新安装 OpenCV 并删除那些旧文件后,错误更改为 legacy.hpp 丢失 - 这正是此处所需要的。
证明如下:http://answers.opencv.org/question/42622/opencv-30-deprecated-opencv_legacy-module/。此外,来自 OpenCV 转换指南:"legacy, nonfree modules have been removed. Some algorithms have been moved to different locations and some have been completely rewritten or removed."