Ask Your Question

gvi's profile - activity

2020-07-07 00:44:41 -0500 received badge  Notable Question (source)
2016-10-27 07:12:25 -0500 received badge  Popular Question (source)
2016-04-07 15:21:35 -0500 received badge  Popular Question (source)
2013-05-22 04:41:58 -0500 asked a question HOGDescriptor::detectMultiScale with TBB on ARM

Hi all! I have implemented in an ARM a computer vision application that uses OpenCV's HOGDescriptor::detectMultiScale. I have found that the execution of HOGDescriptor::detectMultiScale function is accelerated a lot when I compile OpenCV with TBB option:

  • Running time without TBB: 317 ms
  • Running time with TBB: 122.5 ms

Is this the correct behaviour?? I found it very strange, as the ARM I am using has only two cores. How does the TBB acceleration work?? why is so efficient?

I am using a ARM® dual-core Cortex™-A9 MPCore™ / 800 MHz, OpenCV 2.4.3, and TBB 4.1.

Thanks in advance!

2013-03-26 10:05:26 -0500 asked a question problems cross compiling OpenCV with FFMpeg for ARM Linux

Hello all,

I am trying to cross compile OpenCV with FFMPEG for ARM Linux, but I get some errors.

First, I have cross compiled FFMPEG using these flags:

./configure --enable-cross-compile --cross-prefix=arm-linux-gnueabi- --cc=arm-linux-gnueabi-gcc --cxx=arm-linux-gnueabi-g++ --arch=arm --target-os=linux --disable-armv5te --disable-armv6 --disable-armv6t2 --enable-libopencv --enable-pic prefix=/home/mypath/ffmpeg_binARM

Then, I have modified "OpenCVFindLibsVideo.cmake" file In order to "see" the ffmpeg libraries:

--- FFMPEG ---

ocv_clear_vars(HAVE_FFMPEG HAVE_FFMPEG_CODEC HAVE_FFMPEG_FORMAT HAVE_FFMPEG_UTIL HAVE_FFMPEG_SWSCALE HAVE_GENTOO_FFMPEG HAVE_FFMPEG_FFMPEG) if(WITH_FFMPEG) if(WIN32) include("${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/ffmpeg_version.cmake") elseif(UNIX)

set(FFMPEG_INCLUDE_DIR /home/mypath/ffmpeg_binARM/include)
set(FFMPEG_LIB_DIR /home/mypath/ffmpeg_binARM/lib)

set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "${FFMPEG_LIB_DIR}/libavcodec.a"
      "${FFMPEG_LIB_DIR}/libavformat.a" "${FFMPEG_LIB_DIR}/libavutil.a"
      "${FFMPEG_LIB_DIR}/libswscale.a")
set(HAVE_GENTOO_FFMPEG TRUE)
if(EXISTS "${FFMPEG_LIB_DIR}/libavcodec.a")
    set(HAVE_FFMPEG_CODEC 1)
    set(ALIASOF_libavcodec_VERSION "Unknown")
    if(EXISTS "${FFMPEG_LIB_DIR}/libavformat.a")
      set(HAVE_FFMPEG_FORMAT 1)
      set(ALIASOF_libavformat_VERSION "Unknown")
      if(EXISTS "${FFMPEG_LIB_DIR}/libavutil.a")
        set(HAVE_FFMPEG_UTIL 1)
        set(ALIASOF_libavutil_VERSION "Unknown")
        if(EXISTS "${FFMPEG_LIB_DIR}/libswscale.a")
          set(HAVE_FFMPEG_SWSCALE 1)
          set(ALIASOF_libswscale_VERSION "Unknown")
          set(HAVE_FFMPEG 1)
        endif()
      endif()
    endif()
  endif()

ocv_include_directories(${FFMPEG_INCLUDE_DIR})

endif()

------------------------------------------------------------

Finally, I have tried to cross compile OpenCV using this help: http://docs.opencv.org/doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.html

cd ~/opencv/platforms/linux mkdir -p Build_ARM cd Build_ARM

cmake -DSOFTFP=ON -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake ../../..

...and I get these errors when I do "make". Can anyone help me????


[ 34%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/bitstrm.cpp.o Linking CXX shared library ../../lib/libopencv_highgui.so /home/mypath/ffmpeg_binARM/lib/libavformat.a(matroskaenc.o): In function get_aac_sample_rates': /home/mypath/ffmpeg/libavformat/matroskaenc.c:460: undefined reference toavpriv_mpeg4audio_get_config' /home/mypath/ffmpeg_binARM/lib/libavformat.a(matroskaenc.o): In function put_xiph_codecpriv': /home/mypath/ffmpeg/libavformat/matroskaenc.c:440: undefined reference toavpriv_split_xiph_headers' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In function has_decode_delay_been_guessed': /home/mypath/ffmpeg/libavformat/utils.c:916: undefined reference toavpriv_h264_has_num_reorder_frames' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In function ff_read_frame_flush': /home/mypath/ffmpeg/libavformat/utils.c:1624: undefined reference toav_parser_close' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In function has_decode_delay_been_guessed': /home/mypath/ffmpeg/libavformat/utils.c:916: undefined reference toavpriv_h264_has_num_reorder_frames' /home/mypath/ffmpeg/libavformat/utils.c:916: undefined reference to avpriv_h264_has_num_reorder_frames' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In functionparse_packet': /home/mypath/ffmpeg/libavformat/utils.c:1285: undefined reference to av_parser_parse2' /home/mypath/ffmpeg/libavformat/utils.c:1352: undefined reference toav_parser_close' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In function read_frame_internal': /home/mypath/ffmpeg/libavformat/utils.c:1423: undefined reference toav_parser_init' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In function avformat_find_stream_info': /home/mypath/ffmpeg/libavformat/utils.c:2715: undefined reference toav_parser_init' /home/mypath/ffmpeg/libavformat/utils.c:2999: undefined reference to avcodec_pix_fmt_to_codec_tag' /home/mypath/ffmpeg/libavformat/utils.c:3000: undefined reference toavpriv_find_pix_fmt' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In function tb_unreliable': /home/mypath/ffmpeg/libavformat/utils.c:2674: undefined reference toff_raw_pix_fmt_tags' /home/mypath/ffmpeg_binARM/lib/libavformat.a(utils.o): In function estimate_timings_from_pts': /home/mypath/ffmpeg/libavformat/utils.c:2311: undefined reference ... (more)

2013-03-11 09:08:41 -0500 received badge  Nice Question (source)
2013-03-11 06:29:32 -0500 received badge  Student (source)
2013-03-11 06:20:39 -0500 asked a question cross compile OpenCV with FFMPEG for ARM Linux

Hi all! I want to cross compile OpenCV with FFMPG for ARM Linux, but I don't know how to configure Cmake. I have previously downloaded ffmpeg codec from www.ffmpeg.org, and I have built it for ARM. I don't know how to configure Cmake to "see" the built ffmpeg libraries (libavcodec.a, libavformat.a, libavutil.a, libswscale.a).

Can anyone help me??

Thanks in advance!

checking for module 'libavcodec'
package 'libavcodec' not found
checking for module 'libavformat'
package 'libavformat' not found
checking for module 'libavutil'
package 'libavutil' not found
checking for module 'libswscale'
package 'libswscale' not found
Looking for libavformat/avformat.h
Looking for libavformat/avformat.h - not found
Looking for ffmpeg/avformat.h
Looking for ffmpeg/avformat.h - not found