当前位置:网站首页>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 ..
边栏推荐
- Softmax multi classification gradient derivation
- Small turtle C (Chapter 5 loop control structure program 567) break and continue statements
- MOOC Weng Kai C language week 7: array operation: 1. array operation 2. Search 3. preliminary sorting
- Implementation method of Bert
- Codesensor: convert the code into AST and then into text vector
- MySQL excludes holidays and calculates the date difference
- Standard C language summary 4
- 视频格式基础知识:让你了解MKV、MP4、H.265、码率、色深等等
- MOOC Weng Kai C language week 6: arrays and functions: 1. Arrays 2. Definition and use of functions 3. Parameters and variables of functions 4. Two dimensional arrays
- Construction of Yum warehouse
猜你喜欢

Construction of Yum warehouse

Install Nessus under Kali

Freemaker merges cells, uses if and else tags, and processes null and empty strings

Static and floating routes

Easypoi export table with echars chart

NAT-网络地址转换

Metasploit penetration MS7_ 010 exercise

Softmax multi classification gradient derivation

Add, delete, check and modify linked lists

kali下安装nessus
随机推荐
Uniapp monitor whether the app has a network connection
MySQL queries all descendant nodes under the parent node. When querying the user list, it is processed by multi-level (company) departments. According to reflection, it recurses the tree structure too
Install Nessus under Kali
Neo4j running error occurred during initialization of VM incompatible minimum and maximum heap sizes spec
Softmax multi classification gradient derivation
codesensor:将代码转化为ast后再转化为文本向量
Easypoi export table with echars chart
Raspberry pie serial port
Standard C language learning summary 5
MOOC Weng Kai C language week 3: judgment and cycle: 1. Judgment
在转化词向量之前先转化为AST再转化为词向量的实现方法
OJ questions about fast and slow pointers in linked lists
shell---sed语句练习
Bert的实现方法
根据excel生成create建表SQL语句
Differences and relationships among NPM, Yran and NPX
PyTorch - Dropout: A Simple Way to Prevent Neural Networks from Overfitting
C language push box
ELK日志分析系统的部署
232 (female) to 422 (male)