未定义的引用`cv :: viz :: viz3d :: viz3d(std :: __ __ cxx11 :: basic_string< char,std :: char_traits< char> ch>,std :: Allocator&ltocator<

发布于 2025-01-18 13:40:32 字数 620 浏览 3 评论 0 原文

我正在研究 3D 重建并尝试使用 opencv2/viz 可视化 3D 点,但似乎存在以下链接器错误: 对 cv::viz::Viz3d::Viz3d(std::__cxx11::basic_string, std::allocator > const&) 的未定义引用
(不过,我从三角测量中获得了 3D 点)

在构建 OpenCV 时,我在设备中设置了 OPENCV_EXTRA_MODULES_PATH 路径到 opencv_contrib/modules 。此外,/usr/include/opencv2/ 具有 viz 包含文件(viz.hpp 和 viz 目录中的其他标头)。我是否必须在 CMakeLists.txt 中包含 OpenCV 额外的库(我认为 include_directories(${OpenCV_INCLUDE_DIRS}) 应该有效,因为 #include 不起作用抛出任何错误。)?我该如何解决这个错误?

I am working on 3D reconstruction and trying to visualize 3D points using opencv2/viz but there seems this linker error:
undefined reference to cv::viz::Viz3d::Viz3d(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
(I have however obtained 3D points from triangulation)

When building OpenCV i had set OPENCV_EXTRA_MODULES_PATH path to opencv_contrib/modules in my device. Also, /usr/include/opencv2/ has viz include files (viz.hpp and other headers inside viz directory). Do i have to include OpenCV extra libraries in CMakeLists.txt (I think include_directories(${OpenCV_INCLUDE_DIRS}) should work because #include<opencv2/viz.hpp> does not throw any error.)? How do i solve this error?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文