arm架构下编译opencv:
/home/zsd/workspace/opencv3.4.12/opencv-3.4.12/arm-gnueabihf.toolchain.cmake内容:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "Debug CFLAGS")
set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "Debug CXXFLAGS")
set(CMAKE_C_FLAGS_RELEASE " -DNDEBUG" CACHE STRING "Release CFLAGS")#不加入调试信息,进一步缩小体积
set(CMAKE_CXX_FLAGS_RELEASE " -DNDEBUG" CACHE STRING "Release CXXFLAGS")#不加入调试信息,进一步缩小体积
set(CMAKE_C_COMPILER "/home/zsd/workspace/rv1109_dual_sc530ai/project/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "/home/zsd/workspace/rv1109_dual_sc530ai/project/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#set(CMAKE_C_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon")
#set(CMAKE_CXX_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon")
set(CMAKE_C_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DUSE_UPDATEENGINE=ON -DSUCCESSFUL_BOOT=ON" CACHE STRING "ARM CFLAGS")#-Os减小目标文件体积
set(CMAKE_CXX_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DUSE_UPDATEENGINE=ON -DSUCCESSFUL_BOOT=ON" CACHE STRING "ARM CXXFLAGS")#-Os减小目标文件体积
# cache flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags")
/home/zsd/workspace/opencv3.4.12/opencv-3.4.12/build_arm/make.sh:(相比于教程新增-DOPENCV_ENABLE_NONFREE=ON同时参考buildroot中opencv3的编译选项进行裁剪)
cmake -DCMAKE_TOOLCHAIN_FILE=../arm-linux-gnueabihf.toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=./install_arm \
-DCMAKE_BUILD_TYPE=RELEASE -DOPENCV_ENABLE_NONFREE=ON \
-DBUILD_LIST=calib3d,core,features2d,flann,imgcodecs,imgproc,xfeatures2d \
-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-3.4.12/modules/xfeatures2d \
-DBUILD_CUDA_STUBS=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF -DBUILD_OPENEXR=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_PNG=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_TBB=OFF -DBUILD_TESTS=OFF -DBUILD_TIFF=OFF -DBUILD_WITH_DEBUG_INFO=OFF -DBUILD_WITH_DYNAMIC_IPP=OFF -DBUILD_ZLIB=OFF -DBUILD_JAVA=OFF -DBUILD_WITH_STATIC_CRT=OFF -DBUILD_opencv_androidcamera=OFF -DBUILD_opencv_cudaarithm=OFF -DBUILD_opencv_cudabgsegm=OFF -DBUILD_opencv_cudacodec=OFF -DBUILD_opencv_cudafeatures2d=OFF -DBUILD_opencv_cudafilters=OFF -DBUILD_opencv_cudaimgproc=OFF -DBUILD_opencv_cudalegacy=OFF -DBUILD_opencv_cudaobjdetect=OFF -DBUILD_opencv_cudaoptflow=OFF -DBUILD_opencv_cudastereo=OFF -DBUILD_opencv_cudawarping=OFF -DBUILD_opencv_cudev=OFF -DBUILD_ANDROID_CAMERA_WRAPPER=OFF -DBUILD_ANDROID_EXAMPLES=OFF -DBUILD_ANDROID_SERVICE=OFF -DBUILD_FAT_JAVA_LIB=OFF -DBUILD_PROTOBUF=OFF \
-DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_SKIP_RPATH=OFF -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF -DCMAKE_USE_RELATIVE_PATHS=OFF \
-DENABLE_NEON=ON -DENABLE_VFPV3=ON -DENABLE_VFPV4=ON -DENABLE_CCACHE=OFF -DENABLE_AVX=OFF -DENABLE_AVX2=OFF -DENABLE_COVERAGE=OFF -DENABLE_FAST_MATH=OFF -DENABLE_FMA3=OFF -DENABLE_IMPL_COLLECTION=OFF -DENABLE_INSTRUMENTATION=OFF -DENABLE_NOISY_WARNINGS=OFF -DENABLE_OMIT_FRAME_POINTER=OFF -DENABLE_POPCNT=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DENABLE_PROFILING=OFF -DENABLE_SOLUTION_FOLDERS=OFF -DENABLE_POWERPC=OFF \
-DWITH_1394=OFF -DWITH_CLP=OFF -DWITH_CSTRIPES=OFF -DWITH_CUBLAS=OFF -DWITH_CUDA=OFF -DWITH_CUFFT=OFF -DWITH_DIRECTX=OFF -DWITH_DSHOW=OFF -DWITH_EIGEN=OFF -DWITH_FFMPEG=OFF -DWITH_GDAL=OFF -DWITH_GDCM=OFF -DWITH_GIGEAPI=OFF -DWITH_GSTREAMER=OFF -DWITH_GSTREAMER_0_10=OFF -DWITH_INTELPERC=OFF -DWITH_IPP=OFF -DWITH_IPP_A=OFF -DWITH_JASPER=OFF -DWITH_JPEG=ON -DWITH_LAPACK=OFF -DWITH_MATLAB=OFF -DWITH_MSMF=OFF -DWITH_NVCUVID=OFF -DWITH_OPENCL=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENCLAMDFFT=OFF -DWITH_OPENCL_SVM=OFF -DWITH_OPENEXR=OFF -DWITH_OPENGL=OFF -DWITH_OPENMP=OFF -DWITH_OPENNI=OFF -DWITH_OPENNI2=OFF -DWITH_OPENVX=OFF -DWITH_PNG=OFF -DWITH_PTHREADS_PF=OFF -DWITH_PVAPI=OFF -DWITH_QT=OFF -DWITH_TBB=OFF -DWITH_TIFF=OFF -DWITH_VFW=OFF -DWITH_VTK=OFF -DWITH_WEBP=OFF -DWITH_WIN32UI=OFF -DWITH_XIMEA=OFF -DWITH_OPENJPEG=OFF -DWITH_ANDROID_CAMERA=OFF -DWITH_AVFOUNDATION=OFF -DWITH_CARBON=OFF -DWITH_QUICKTIME=OFF -DWITH_VIDEOINPUT=OFF -DWITH_GPHOTO2=OFF -DWITH_UNICAP=OFF -DWITH_VA=OFF -DWITH_VA_INTEL=OFF -DWITH_XINE=OFF -DWITH_GTK=OFF -DWITH_PROTOBUF=OFF -DWITH_V4L=OFF -DWITH_LIBV4L=OFF \
-DINSTALL_C_EXAMPLES=OFF -DINSTALL_TEST=OFF -DINSTALL_PYTHON_EXAMPLES=OFF -DINSTALL_CREATE_DISTRIB=OFF -DINSTALL_ANDROID_EXAMPLES=OFF -DINSTALL_TO_MANGLED_PATHS=OFF -DWITH_GTK_2_X=OFF \
-DOPENCV_WARNINGS_ARE_ERRORS=OFF -DDOWNLOAD_EXTERNAL_TEST_DATA=OFF -DOPENCV_ENABLE_PKG_CONFIG=OFF ..
若执行make.sh失败,则将build_arm文件夹删掉重新创建一个编译
将安装目录install_arm下的lib和include移植到opencv_test中
编译应用命令:
arm-linux-gnueabihf-g++ main.cpp Panorama.cpp cropper.cpp -o main -I./ -I./include/ -L./lib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_imgcodecs -lopencv_imgproc -lopencv_xfeatures2d
执行./main arg1 arg2 arg3即可生成结果result.jpg图片,arg1表示几张图片,arg2表示算法阈值,arg3表示摄像头是否是倒装拍照的,正向拍照图片顺序是从左到右,倒装拍照图片顺序是从右到左
------------------------------------------------------------------------------------
ubuntu下编译opencv:参考https://blog.csdn.net/lu_linux/article/details/131113812
/home/zsd/workspace/opencv3.4.12/opencv-3.4.12/linux-gnueabihf.toolchain.cmake内容:
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR x86_64)
set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "Debug CFLAGS")
set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "Debug CXXFLAGS")
set(CMAKE_C_FLAGS_RELEASE " -DNDEBUG" CACHE STRING "Release CFLAGS")#不加入调试信息,进一步缩小体积
set(CMAKE_CXX_FLAGS_RELEASE " -DNDEBUG" CACHE STRING "Release CXXFLAGS")#不加入调试信息,进一步缩小体积
set(CMAKE_C_COMPILER "/usr/bin/gcc")
set(CMAKE_CXX_COMPILER "/usr/bin/g++")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#set(CMAKE_C_FLAGS "-march=native -pipe")
#set(CMAKE_CXX_FLAGS "-march=native -pipe")
set(CMAKE_C_FLAGS "-march=native -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DUSE_UPDATEENGINE=ON -DSUCCESSFUL_BOOT=ON" CACHE STRING "x86 CFLAGS")#-Os减小目标文件体积
set(CMAKE_CXX_FLAGS "-march=native -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -DUSE_UPDATEENGINE=ON -DSUCCESSFUL_BOOT=ON" CACHE STRING "x86 CXXFLAGS")#-Os减小目标文件体积
# cache flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags")
/home/zsd/workspace/opencv3.4.12/opencv-3.4.12/build_x86/make.sh内容:
cmake -DCMAKE_TOOLCHAIN_FILE=../linux-gnueabihf.toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=./install_x86 \
-DCMAKE_BUILD_TYPE=RELEASE -DOPENCV_ENABLE_NONFREE=ON \
-DBUILD_LIST=calib3d,core,features2d,flann,imgcodecs,imgproc,xfeatures2d \
-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-3.4.12/modules/xfeatures2d \
-DBUILD_CUDA_STUBS=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF -DBUILD_OPENEXR=OFF -DBUILD_PACKAGE=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_PNG=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_TBB=OFF -DBUILD_TESTS=OFF -DBUILD_TIFF=OFF -DBUILD_WITH_DEBUG_INFO=OFF -DBUILD_WITH_DYNAMIC_IPP=OFF -DBUIL
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
opencv3.4.12全景拼接 (550个子文件)
00004cae5ac6e11b76652ce8c78d4430e05688 1KB
026e3c9f8833d8b1440ca83ef17d5f90157787 14KB
0303d2495fe878340b80bf1a4b330ed7aadc5f 1KB
039a5a72c2c5c11d9e2e65670db361831f71a7 3KB
04b3177a58f51a4137d92803198a17f8ca3ab4 1KB
04bef90a74117638002b2148f6b9bdf47cd73b 16KB
0506f5294183dd0336578c229683cfc0100873 7KB
0592ff96aa2dc21dd954224bb3e61e8153e9a2 510B
05c36abd53dea57a2bee05af50c378014b8d1b 1.51MB
06583ea433e289e883270d81f8641985cc3ebb 6KB
0691b44823bc6ee0564cc959b61af2c34a508c 17KB
070c77d2890a4443ebcb776ac978712c92e0ec 1KB
0940037d1e047b7f40c3b8103f6b128fcfe2f8 6KB
0ab141d9974866f29ff1a84961a50b67176b1c 1KB
0c6d37a86c8bd6fd3c93d7b89f3c52b5ffbd96 1KB
0cc2c820ea9d0effb270c4ab2918a1046cd65e 491B
0ce1bb7e0eceac667e206031b3e57bc000710d 2KB
0ea0cd2bf58c23df7a140b3d8d97522de46284 231B
0ecfc01720970e408d9368c96cfa9e34b0a2d3 7KB
0f10fd86c8a58ef20937a6800240713d9750c8 2KB
0f63cd35e7e413fa00f69b2b8524903aabea22 209B
11812a7744ad7e100de82c2d6782c50bc0c122 2KB
libopencv_imgproc.so.3.4.12 2.94MB
libopencv_xfeatures2d.so.3.4.12 2.5MB
libopencv_core.so.3.4.12 2.26MB
libopencv_calib3d.so.3.4.12 1011KB
libopencv_features2d.so.3.4.12 720KB
libopencv_flann.so.3.4.12 394KB
libopencv_imgcodecs.so.3.4.12 192KB
12aed6c6ce9def83b9fecc15f8be14b4790363 711B
15ed629a395ae7a79e46883bd8f0d67eebb8ee 1KB
16446abbe0d9cd3f6bc23412e00cb9e8477a5f 7KB
1808a8a17220d63d4442fd404aaa1dbf9c6b67 6KB
19848827543461c62aeacc90b41c8c105fa5ea 3KB
1beacda3d5779ec4de7ad811a1e37c8ae9c5ab 288B
1c682cfe98e997619d284d763838ed2313cb23 2KB
1d1404e7121e03d506e4723b194029546ea100 2KB
1df0ad08c1757800a26376e047b0746b67a2ae 1KB
20d0fd64de9090dd9f02a296ea3de0a3884ef1 2KB
23930024b724cb2346d954056929ad277462b6 3KB
279dfda5eaf19c3a46a204357f3a4dc3b427a7 3KB
27c1425a3ae182d0d713f476da94c04796f714 6KB
288bebe8f51cd64f2a089bc8830320845b22c5 6KB
28b178313e0494c6fe2b160a0148d62f88e0a9 7KB
28f722fccacd8e7491abfd464b8b7c43b51074 1KB
28fb0962efb20ecaa6b16c545b16d5917549f4 3KB
290c4fec080fd5c2f8590d89ae8686f42e8039 822B
2d822807751be62ee549f62ef829ded6e488a2 2KB
2ed307858323ffbb4fa95c7c1275b9932c0574 6KB
334801003743abe604ed823a6d42b9e21769ae 8KB
342c00c3d723a19144bbfb01be4cac9e039a58 884B
34cf1f4f2db81ade82e43035396fb8ea9dc1e0 1KB
359b4b7b114b318211de5493a69ea748c8fdb9 2KB
35fd6b8558ec7460cada0656c894ea26429989 2KB
367cc25b765d545ab12e463295d34793c2f7e9 1KB
36b19b027fcc5ec2ff78c94f28b46919425fda 763B
376bacb9ab5ef9167f54b688ce474f2a92ac2e 1010B
37c173be64bed1331f49260388acceea6de56b 4KB
38488b0ce9c574a49acfd91afb5a2f3d9d145c 1KB
3986708050890cc530be68fa7cb5c208b750d8 2KB
3a382ddf5aafdd62514fa788a3a077a35c357c 75KB
3b084264a4191fc63a3d2411c9978d7a5df8de 307B
3b5beff0f9825f0fae4bf326d21d2515f8ef01 19KB
3ba99ec3569e5dc13b637daf1493b7c1ad6afb 2KB
3c65b0c1e7b373d2d4348d889eb83e2aa5b935 369B
3c743732240cab6e86a701d59cc238528edb6f 2KB
3d7a6f0d0c4331e539b5637601ca64892d142f 822B
3df914ac95f387775587a692b1fc06e01da953 1KB
3e4fd7384e3986b42f680dca7e03ffd6ac69e5 7KB
3f06179d137cbf871453ab6713a3d3b337b342 2KB
3f675192c1919f6c97e65ee91ff5e4c5be27e8 10KB
libopencv_imgproc.so.3.4 2.94MB
libopencv_xfeatures2d.so.3.4 2.5MB
libopencv_core.so.3.4 2.26MB
libopencv_calib3d.so.3.4 1011KB
libopencv_features2d.so.3.4 720KB
libopencv_flann.so.3.4 394KB
libopencv_imgcodecs.so.3.4 192KB
4182efc238b73b09bd03a2a56f438030725538 1.08MB
44d4e04693d94a91cdb32017b62370dd0bd3ae 6KB
452b9bba20e9d98e6cafc1803022a7bfb486a4 1KB
47b5463f98006a199e8fc3006239f3b40ddf62 85B
481587f05782ae97989657dec822276096a48c 2KB
4b9c00dd64489d8d095f45af3161e894bb138d 475B
4b9c3bcbfece46df7dcea4f04557cef84eab68 7KB
4f705baf0249644f0b92ea31cfa2cb31b4ae19 4KB
51d3607362136e7138823822db461942b0e33a 1KB
52bfeeb5ac530231d57d6f63859b037db07c89 8KB
53082a67b374c01591e7480bbf62f595683fa5 986B
531a13edb749a25721248a815247e6c4ff8507 5KB
535de429876067e6b32453fbb313a18e7b030f 118B
53cf5c1b909f14b085a22961b80894a86e8e7b 4KB
543840d60a96d82626429cadef14c1837d2a64 2KB
54c8857dbdf8d03c7d9c6bb82676ab2272ad84 119B
560c7d001aec72de74f3596402e639786364f8 1KB
570c6830c41bb53e7f9802f2a430f5181218c0 1KB
57d7eb8d69a56197b8e80430728d571282088f 2KB
585c254648eff5b559e376c8040fae07a7a928 301B
5889655f7bc01f5cfde8a368f934d6f83a7a5f 170B
5a3a98f7c3899ac1026b3047d800ade48e118d 7KB
共 550 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
Sandy6Zhou
- 粉丝: 4380
- 资源: 25
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Kotlin语言的Android开发工具类集合源码
- 零延迟 DirectX 11 扩展实用程序.zip
- 基于Java的语音识别系统设计源码
- 基于Java和HTML的yang_home766个人主页设计源码
- 基于Java与前端技术的全国实时疫情信息网站设计源码
- 基于鸿蒙系统的HarmonyHttpClient设计源码,纯Java实现类似OkHttp的HttpNet框架与优雅的Retrofit注解解析
- 基于HTML和JavaScript的廖振宇图书馆前端设计源码
- 基于Java的Android开发工具集合源码
- 通过 DirectX 12 Hook (kiero) 实现通用 ImGui.zip
- 基于Java开发的YY网盘个人网盘设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功