gpt4 book ai didi

opencv - 在 Raspberry Pi 2 上使用 TBB 编译 OpenCV 3

转载 作者:行者123 更新时间:2023-12-02 16:39:04 25 4
gpt4 key购买 nike

有没有人在 pi 2 上的最新 rasperian 上成功安装了启用了 TBB 的 opencv 3.0.0?

我按照这里的指南
https://www.raspberrypi.org/forums/view ... v3#p761255

我所做的唯一区别是通过 cmake 启用 TBB ...添加了 BUILD 和 WITH TBB 选项,如图所示。
cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_TBB=ON -D WITH_TBB=ON -D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") -D PYTHON_EXECUTABLE=$(which python3) ..

据我所知,我已修补当前所有依赖项。
cmake 报告它将安装和旧版本的 tbb ......

-- Use TBB: YES (ver 4.1 interface 6102)

制作过程因我不完全理解的链接问题而失败,
[ 66%] Built target opencv_features2d
Scanning dependencies of target opencv_test_flann
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::task_group_context::cancel_group_execution()'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::interface5::internal::task_base::destroy(tbb::task&)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::initialize(int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task::note_affinity(unsigned short)'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::internal::handle_perror(int, char const*)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_child_proxy::allocate(unsigned int) const'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::internal::NFS_Free(void*)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_group_context::is_group_execution_cancelled() const'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::internal::throw_exception_v4(tbb::internal::exception_id)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::terminate()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::initialize(int, unsigned int)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `typeinfo for tbb::task'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::internal::allocate_additional_child_of_proxy::allocate(unsigned int) const'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::task_group_context::reset()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_continuation_proxy::allocate(unsigned int) const'
../../lib/libopencv_core.so.3.0.0: undefined reference to `vtable for tbb::task'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_root_with_context_proxy::free(tbb::task&) const'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_group_context::init()'
../../lib/libopencv_imgproc.so.3.0.0: undefined reference to `tbb::internal::NFS_Allocate(unsigned int, unsigned int, void*)'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_scheduler_init::default_num_threads()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::get_initial_auto_partitioner_divisor()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::task_group_context::~task_group_context()'
../../lib/libopencv_core.so.3.0.0: undefined reference to `tbb::internal::allocate_root_with_context_proxy::allocate(unsigned int) const'
[ 66%] Building CXX object modules/core/CMakeFiles/opencv_perf_core.dir/perf/perf_abs.cpp.o
collect2: ld returned 1 exit status
apps/annotation/CMakeFiles/opencv_annotation.dir/build.make:99: recipe for target 'bin/opencv_annotation' failed
make[2]: *** [bin/opencv_annotation] Error 1
CMakeFiles/Makefile2:7228: recipe for target 'apps/annotation/CMakeFiles/opencv_annotation.dir/all' failed
make[1]: *** [apps/annotation/CMakeFiles/opencv_annotation.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

我尝试过的事情...
  • 我认为更新版本的 TBB 可能会有所帮助......所以在如上所示失败后,我破解了 opencv 安装程序并进行了更改
    将 TBB 加载到最新版本……不开心……同样的问题。
  • 试图让它完成我发现我可以更新 opencv/apps 文件夹中的 cmakelists.txt 而不安装注释应用程序..
    还是失败了。但在不同的应用程序.. traincascade... 删除它.. 相同... 从 CmakeLists.txt 中删除目录中的最后一个应用程序
    它成功了。但是,当尝试链接我的 c 应用程序时,它会提示 imgproc 上 Unresolved 引用:|
  • 运行 ccmake ../并关闭构建测试和其他附加功能......不高兴。

  • 感谢我能提供的任何帮助.. 如果可以的话,希望 tbb 为我的 pi 使用四个内核!

    最佳答案

    2018 年 8 月最新更新,

    查看我的 git:https://github.com/abhiTronix/OpenCV_Raspberry_pi_TBB

    用于 Raspberry Pi 的预发布 OpenCV (4.0.0) 和稳定 OpenCV (3.4.2) 以及 TBB (2018-Update 4) 的最新预编译二进制文件(在 Rpi 版本 2/3 模型 B/B+ 上测试,带有 Stretch ) 轻松安装(.deb 文件)

    它是我从头开始构建的,您可以查看它以获取更多详细信息。

    关于opencv - 在 Raspberry Pi 2 上使用 TBB 编译 OpenCV 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30955734/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com