Ask Your Question
0

Ubuntu下编译opencv4.3.0+opencv_contrib4.3.0 android sdk

asked 2020-04-26 00:51:15 -0500

xiang gravatar image

updated 2020-04-26 02:12:41 -0500

berak gravatar image

我的编译脚本:

./build_sdk.py --ndk_path ~/opencvspace/android-ndk-r21/ --sdk_path ~/opencvspace/tools/ --extra_modules_path ~/opencvspace/opencv43/opencv_contrib-4.3.0/modules/ --config ~/opencvspace/opencv43/opencv-4.3.0/platforms/android/ndk-18-api-level-21.config.py --no_ccache ~/opencvspace/opencv43/build/ ~/opencvspace/opencv43/opencv-4.3.0/

**运行环境如下**:
Package configuration:
================================================================================
ABIs = [
    ABI("2", "armeabi-v7a", None, 21, cmake_vars=dict(ANDROID_ABI='armeabi-v7a with NEON')),
    ABI("3", "arm64-v8a",   None, 21),
    ABI("5", "x86_64",      None, 21),
    ABI("4", "x86",         None, 21),
]
================================================================================
-- General configuration for OpenCV 4.3.0 =====================================
--   Version control:               unknown
-- 
--   Extra modules:
--     Location (extra):            /root/opencvspace/opencv43/opencv_contrib-4.3.0/modules
--     Version control (extra):     unknown
-- 
--   Platform:
--     Timestamp:                   2020-04-26T04:11:42Z
--     Host:                        Linux 4.15.0-88-generic x86_64
--     Target:                      Android 1 armv7-a
--     CMake:                       3.17.0
--     CMake generator:             Ninja
--     CMake build tool:            /usr/bin/ninja
--     Configuration:               RELEASE
-- 
--   CPU/HW features:
--     Baseline:                    NEON
--       requested:                 DETECT
-- 
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ standard:                11
--     C++ Compiler:                /root/opencvspace/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  (ver 9.0)
--     C++ flags (Release):         -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -Oz -DNDEBUG   -DNDEBUG
--     C++ flags (Debug):           -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security     -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -O0 -fno-limit-debug-info   -DDEBUG -D_DEBUG -g
--     C Compiler:                  /root/opencvspace/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
--     C flags (Release):           -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -Oz -DNDEBUG   -DNDEBUG
--     C flags (Debug):             -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security    -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments  -fvisibility=hidden -fvisibility-inlines-hidden  -O0 -fno-limit-debug-info   -DDEBUG -D_DEBUG -g
--     Linker flags (Release):      -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments   -Wl,--as-needed  
--     Linker flags (Debug):        -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments   -Wl,--as-needed  
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          ade dl m log
--     3rdparty dependencies:       libcpufeatures ittnotify libprotobuf tbb zlib libjpeg-turbo libwebp libpng libtiff libjasper IlmImf quirc tegra_hal
-- 
--   OpenCV modules:
--     To be built:                 aruco bgsegm bioinspired calib3d ccalib core datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2020-07-20 06:44:56 -0500

i have similar problem as you. hdf is not found in "To be built" group above. How to get it included. what configuration we have to make. i also work in opencv for arm cross compiling. my build host is cygwin in windows 10. i could include hdf5 by downloading hdf5 1.8 version from hdf group and copying to the modules folder under contrib group. i use cmake for configuring. hdf folder with cmakelists.txt is already available in opencv_contrib4.3.0. i could include other modules of opencv_contrib like hdf5, hfs, etc. my problem is i could not include hdf for configuration and compile. please help me. thanks in advance

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-04-26 00:51:15 -0500

Seen: 288 times

Last updated: Apr 26