2021-03-03

1、首先是配置好opencv的依赖库

yum install cmake gcc gcc-c++ gtk+-devel gimp-devel gimp-devel-tools gimp-help-browser zlib-devel libtiff-devel libjpeg-devel libpng-devel gstreamer-devel libavc1394-devel libraw1394-devel libdc1394-devel jasper-devel jasper-utils swig python libtool nasm build-essential ant

2、下载opencv

华为云obs:https://obs-gyktest.obs.cn-southwest-2.myhuaweicloud.com/ajar/opencv-3.4.13.zip

可以去官网自行下载!!!注意版本!(https://opencv.org/releases/)

3、解压后cd到opencv-3.4.13

cd opencv-3.4.13

mkdir build

cd build

cmake -d cmake_build_type=release -d cmake_install_prefix=/usr/local -dbuild_tests=off ..

make -j8

备注:如果没有cmake,请使用https://blog.csdn.net/sz76211822/article/details/74729272 方式安装cmake





把bin目录中的jar包配置到项目中去





你可能感兴趣的:(2021-03-03)