OpenCV的与TBB配置ARM(Ubuntu的,3.0.63) [英] OpenCV configure with TBB for ARM (Ubuntu, 3.0.63)

查看:3629
本文介绍了OpenCV的与TBB配置ARM(Ubuntu的,3.0.63)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译TBB支持的OpenCV库为 odroid U2 (采用四核ARM Cortex-A9 MPCore的)。我有一个编译当前的OpenCV(从GitHub)无TBB没有问题。而且我也有编译TBB库弗朗来源没有问题 - <一个href=\"http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130116oss_src.tgz\"相对=nofollow> tbb41_20130116oss_src.tgz ,我已经成功地建造TBB库:

<$p$p><$c$c>root@odroid:~/src/tbb41_20130116oss/build/linux_armv7l_gcc_cc4.6_libc2.15_kernel3.0.63_release# LS
arena.d concurrent_queue.o frontend.d libtbbmalloc.so.2 proxy.d scheduler.o task_v2.d tbb_thread.d
arena.o concurrent_queue_v2.d frontend.o libtbbmalloc_proxy.so proxy.o semaphore.d task_v2.o tbb_thread.o
backend.d concurrent_queue_v2.o governor.d libtbbmalloc_proxy.so.2 queuing_mutex.d semaphore.o tbb.def tbbmalloc.d
backend.o concurrent_vector.d governor.o market.d queuing_mutex.o spin_mutex.d tbb_function_replacement.d tbbmalloc.def
backref.d concurrent_vector.o itt_notify.d market.o queuing_rw_mutex.d spin_mutex.o tbb_function_replacement.o tbbmalloc.o
backref.o concurrent_vector_v2.d itt_notify.o mutex.d queuing_rw_mutex.o spin_rw_mutex.d tbb_main.d tbbmallocproxy.def
cache_aligned_allocator.d concurrent_vector_v2.o itt_notify_malloc.d mutex.o reader_writer_lock.d spin_rw_mutex.o tbb_main.o tbbvars.csh
cache_aligned_allocator.o condition_variable.d itt_notify_malloc.o observer_proxy.d reader_writer_lock.o spin_rw_mutex_v2.d tbb_misc.d tbbvars.sh
concurrent_hash_map.d condition_variable.o large_objects.d observer_proxy.o recursive_mutex.d spin_rw_mutex_v2.o tbb_misc.o version_string.ver
concurrent_hash_map.o critical_section.d large_objects.o pipeline.d recursive_mutex.o task.d tbb_misc_ex.d
concurrent_monitor.d critical_section.o libtbb.so pipeline.o rml_tbb.d task.o tbb_misc_ex.o
concurrent_monitor.o dynamic_link.d libtbb.so.2 private_server.d rml_tbb.o task_group_context.d tbb_statistics.d
concurrent_queue.d dynamic_link.o libtbbmalloc.so private_server.o scheduler.d task_group_context.o tbb_statistics.o
根@ odroid:〜/ src目录/ tbb41_20130116oss /编译/ linux_armv7l_gcc_cc4.6_libc2.15_kernel3.0.63_release#

我可以编译我自己PROGRAMM使用g ++使用此TBB库,但我不能配置OpenCV中看到这个TBB库:

 根@ odroid:〜/ src目录/工作/ OpenCV的/释放#cmake的-D CMAKE_BUILD_TYPE = RELEASE -D WITH_TBB = ON -D CMAKE_INSTALL_ preFIX =的/ usr /本地。 。
- 检测到GNU GCC版本:46(406)
- 发现的OpenEXR:/usr/lib/libIlmImf.so
- 检查模块的GStreamer-APP-0.10
- 包'的GStreamer-APP-0.10'未找到
- 寻找Linux的/ videodev.h
- 寻找Linux的/ videodev.h - 未找到
- 寻找Linux的/ videodev2.h
- 寻找Linux的/ videodev2.h - 发现
- 寻找SYS / videoio.h
- 寻找SYS / videoio.h - 未找到
- 寻找了libavformat / avformat.h
- 寻找了libavformat / avformat.h - 发现
- 寻找的ffmpeg / avformat.h
- 寻找的ffmpeg / avformat.h - 未找到
- 检查模块TBB
- 包'TBB'未找到
[...]

你能解释一下我该怎么办呢?谢谢!


解决方案

尝试建立与opencv包含的TBB版本(BUILD_TBB = TRUE),对我的作品在odroid-X2:

  cmake的-D CMAKE_BUILD_TYPE = RELEASE -DCMAKE_INSTALL_ preFIX =的/ usr /本地/ OpenCV的-2.4-ec15d6f383e0aae -DBUILD_TBB:BOOL =1-DWITH_TBB:BOOL =1 ..
使-j 4

如果你做一个化妆安装时,一定要./lib/libtbb.so到的地方在那里可以找到复制,否则OpenCV的只是离开它。

I'm trying to compile OpenCV libs with TBB support for odroid U2 (with Quad core ARM Cortex-A9 MPCore). I have no problem with compile current OpenCV (from github) without TBB. And also I have no problem with compiling TBB libs fron sources - tbb41_20130116oss_src.tgz and I have successfully builded TBB libs:

root@odroid:~/src/tbb41_20130116oss/build/linux_armv7l_gcc_cc4.6_libc2.15_kernel3.0.63_release# ls
arena.d                    concurrent_queue.o      frontend.d           libtbbmalloc.so.2        proxy.d               scheduler.o           task_v2.d                   tbb_thread.d
arena.o                    concurrent_queue_v2.d   frontend.o           libtbbmalloc_proxy.so    proxy.o               semaphore.d           task_v2.o                   tbb_thread.o
backend.d                  concurrent_queue_v2.o   governor.d           libtbbmalloc_proxy.so.2  queuing_mutex.d       semaphore.o           tbb.def                     tbbmalloc.d
backend.o                  concurrent_vector.d     governor.o           market.d                 queuing_mutex.o       spin_mutex.d          tbb_function_replacement.d  tbbmalloc.def
backref.d                  concurrent_vector.o     itt_notify.d         market.o                 queuing_rw_mutex.d    spin_mutex.o          tbb_function_replacement.o  tbbmalloc.o
backref.o                  concurrent_vector_v2.d  itt_notify.o         mutex.d                  queuing_rw_mutex.o    spin_rw_mutex.d       tbb_main.d                  tbbmallocproxy.def
cache_aligned_allocator.d  concurrent_vector_v2.o  itt_notify_malloc.d  mutex.o                  reader_writer_lock.d  spin_rw_mutex.o       tbb_main.o                  tbbvars.csh
cache_aligned_allocator.o  condition_variable.d    itt_notify_malloc.o  observer_proxy.d         reader_writer_lock.o  spin_rw_mutex_v2.d    tbb_misc.d                  tbbvars.sh
concurrent_hash_map.d      condition_variable.o    large_objects.d      observer_proxy.o         recursive_mutex.d     spin_rw_mutex_v2.o    tbb_misc.o                  version_string.ver
concurrent_hash_map.o      critical_section.d      large_objects.o      pipeline.d               recursive_mutex.o     task.d                tbb_misc_ex.d
concurrent_monitor.d       critical_section.o      libtbb.so            pipeline.o               rml_tbb.d             task.o                tbb_misc_ex.o
concurrent_monitor.o       dynamic_link.d          libtbb.so.2          private_server.d         rml_tbb.o             task_group_context.d  tbb_statistics.d
concurrent_queue.d         dynamic_link.o          libtbbmalloc.so      private_server.o         scheduler.d           task_group_context.o  tbb_statistics.o
root@odroid:~/src/tbb41_20130116oss/build/linux_armv7l_gcc_cc4.6_libc2.15_kernel3.0.63_release#

I can compile my own programm with g++ using this TBB libs, but I can't configure OpenCV to see this TBB libs:

root@odroid:~/src/work/opencv/release# cmake -D CMAKE_BUILD_TYPE=RELEASE -D  WITH_TBB=ON -D CMAKE_INSTALL_PREFIX=/usr/local ..
-- Detected version of GNU GCC: 46 (406)
-- Found OpenEXR: /usr/lib/libIlmImf.so
-- checking for module 'gstreamer-app-0.10'
--   package 'gstreamer-app-0.10' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- checking for module 'tbb'
--   package 'tbb' not found
[...]

could you explain how I can do this? Thank you!

解决方案

Try building opencv with the included TBB build (BUILD_TBB=true), works for me on odroid-x2:

cmake -D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local/opencv-2.4-ec15d6f383e0aae -DBUILD_TBB:BOOL="1" -DWITH_TBB:BOOL="1" ..
make -j 4

If you do a make install, be sure to copy ./lib/libtbb.so to somewhere where it can be found, otherwise opencv just leaves it there.

这篇关于OpenCV的与TBB配置ARM(Ubuntu的,3.0.63)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆