在Raspberry Pi 2上使用TBB卷起OpenCV 3

时间:2015-06-20 15:31:56

标签: opencv raspberry-pi tbb

是否有人在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....

我尝试过的事情......

  1. 我认为更新版本的TBB可能会有所帮助...所以如上所示失败之后我攻击了opencv安装程序并更改了 TBB负载到最新版本......没有快乐..同样的问题。
  2. 尝试完成它我发现我可以更新opencv / apps文件夹中的cmakelists.txt而不安装注释应用程序。 仍然失败了。但在另一个应用程序.. traincascade ...删除它..相同...从CmakeLists.txt删除目录中的最后一个应用程序 它成功了。但是,当尝试链接我的c应用程序时,它会抱怨imgproc:|
  3. 上未解析的引用
  4. Ran ccmake ../并转向构建测试和其他额外内容......没有快乐。
  5. 感谢我的任何帮助..如果可以的话,我希望tbb能够为我的pi使用四核!

1 个答案:

答案 0 :(得分:0)

最新更新于2018年8月,

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

针对Raspberry Pi的预发布OpenCV(4.0.0)和Stable OpenCV(3.4.2)以及TBB(2018-Update 4)的最新预编译二进制文件(在Rpi版本2/3上进行了测试)带有Stretch的B / B +型)易于安装(.deb文件)

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