当前位置:网站首页>build_ opencv.sh
build_ opencv.sh
2022-07-28 07:16:00 【Sauerkraut】
1. To write build_opencv.sh
#!/usr/bin/env bash
CAFFE_USE_MPI=${1:-OFF}
CAFFE_MPI_PREFIX=${MPI_PREFIX:-""}
# update the submodules: Caffe and Dense Flow
git submodule update --remote
# install Dense_Flow dependencies
sudo apt-get -qq install libzip-dev
# install common dependencies: OpenCV
# adpated from OpenCV.sh
version="2.4.13"
echo "Building OpenCV" $version
[[ -d 3rd-party ]] || mkdir 3rd-party/
cd 3rd-party/
if [ ! -d "opencv-$version" ]; then
echo "Installing OpenCV Dependenices"
sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils
echo "Downloading OpenCV" $version
wget -O OpenCV-$version.zip https://github.com/Itseez/opencv/archive/$version.zip
echo "Extracting OpenCV" $version
unzip OpenCV-$version.zip
fi
echo "Building OpenCV" $version
cd opencv-$version
[[ -d build ]] || mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_TBB=ON -D WITH_V4L=ON ..
if make -j32 ; then
cp lib/cv2.so ../../../
echo "OpenCV" $version "built."
else
echo "Failed to build OpenCV. Please check the logs above."
exit 1
fi
2. stay build_opencv.sh Open the terminal under the directory , Input :
sh build_opencv.sh
1. If there are questions , Try to build_opencv.sh Add under the directory cv2.so Text
2. When using this method , Need to use opecnv2.4.X edition
/usr/bin/ld: Can't find -lopencv_dep_cudart
solve : use cmake -D CUDA_USE_STATIC_CUDA_RUNTIME=OFF .. Instead of cmake ..
边栏推荐
- Three cache technologies -- localstorage, sessionstorage, cookies
- 登录进oracle10g的oem,想管理监听程序却总是弹出帐号密码输入页面
- shell---条件语句练习
- Shell--- sed statement exercise
- Gd32f407 porting freertos+lwip
- Small turtle C (Chapter 5 loop control structure program 567) break and continue statements
- js二级联动院系
- VNC Timed out waiting for a response from the computer
- Joern的代码使用-devign
- Addition, deletion, check and modification of sequence table
猜你喜欢
随机推荐
Open virtual machine kali2022.2 and install GVM
Sysevr environment configuration: joern-0.3.1, neo4j-2.1.5, py2neo2.0
Media set up live broadcast server
读取xml文件里switch节点的IP和设备信息,ping设备,异常显示在列表里
根据excel生成create建表SQL语句
C language maze
SySeVR环境配置:joern-0.3.1、Neo4j-2.1.5、py2neo2.0
Standard C language learning summary 3
Shell -- first day homework
C language: understand the creation and destruction of function stack frames through an example
主动扫描技术nmap详解
WiFi one click connection configuration of raspberry pie
Pytorch installation - CPU version
How did tensor leak your memory / video memory
三层交换和VRRP
Event_ Loop event loop mechanism
Differences and relationships among NPM, Yran and NPX
Small turtle C (Chapter 5 loop control structure program 567) break and continue statements
Canvas drawing 1
NAT network address translation









