当前位置:网站首页>ubantu1804 两个opencv版本共存
ubantu1804 两个opencv版本共存
2022-06-11 20:30:00 【再路上1216】
ubantu18.04自带opencv3.2.0
由于使用indemind双目模组所以需要安装opencv343;
首先去opencv官网下载343source源代码并解压;
mkdir build && cd buildcmake的时候一定要注意路径,本次安装在 /usr/local/opencv/opencv343
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/opencv/opencv343 ..
接下来进行编译
sudo make -j4执行安装命令
sudo make install将OpenCV的库添加到路径,从而可以让系统找到
sudo gedit /etc/ld.so.conf.d/opencv.conf
执行此命令后打开的是一个空白的文件,不用管,将下面的代码复制上去,保存关闭即可
/usr/local/opencv/opencv343
/usr/local/opencv/opencv343/lib执行如下命令使得刚才的配置路径生效
sudo ldconfig
配置bash
sudo gedit /etc/bash.bashrc
在文本最末尾添加
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opencv/opencv343/lib/pkgconfig
export PKG_CONFIG_PATH执行如下命令使得配置生效
source /etc/bash.bashrc
或者
sudo ~/.bashrc
打开后把下面这句添加
source /etc/bash.bashrc
更新
sudo updatedb
结束亲测可用。
测试一下版本,回到客户端输入
pkg-config opencv --modversion显示
3.4.3表示opencv安装成功。
在使用opencv343时,可在cmakelist文件中添加
set(OpenCV_DIR "/home/tianbot/Downloads/opencv-3.4.3/build")
set(OpenCV_LIB_PATH "/usr/local/opencv/opencv343/lib")
set(OpenCV_INCLUDE_DIRS "/usr/local/opencv/opencv343/include") 边栏推荐
- 2022-2028 global and Chinese thermopile detector Market Status and future development trend
- vectorDrawable使用报错
- 修改本地微信小程序的AppID
- Recompile kubeadm to solve the problem of certificate expiration in one year
- Richter's substitution principle
- 2022-2028 global and Chinese thermal ionization isotope mass spectrometer (TIMS) market status and future development trend
- First modelarts training
- Calculation of Zeno paradox
- Chrome V8 source code 48 The secret of weak type addition,'+'source code analysis
- What is the meaning of holding shares of financial products?
猜你喜欢

File upload vulnerability - simple exploitation 2 (Mozhe college shooting range)

Apache APISIX 在Amazon Graviton3 上的安装和性能测试

26. timer

Show your creativity and win the graphics card! Mmpose attitude estimation creative contest shocks

Gestionnaire de paquets d'Unit é Starting Server Stuck

11 r create random number

浅聊对比学习(Contrastive Learning)第一弹

In 2021, the global ceramic substrate revenue will be about US $409.7 million, and it is expected to reach US $657.3 million in 2028

Final examination of theory and practice of socialism with Chinese characteristics 1

Flutter doctor shows the solution that Xcode is not installed
随机推荐
moderlarts第一次培訓
2022-2028 global and Chinese thermocouple sensor market status and future development trend
STC 纯硬件自动下载电路 V2
Teach you how to grab ZigBee packets through cc2531 and parse encrypted ZigBee packets
10 R vector operation construction
Unity截屏
Installation and performance test of Apache APIs IX on Amazon graviton3
APB2standard_ handshake_ Bridge design
26. 定时器
Power supply anti reverse connection and anti backflow - use MOS tube and op amp to realize ideal diode
7905 and TL431 negative voltage regulator circuit - regulator and floating circuit relative to the positive pole of the power supply
Using the flask framework to write the bezel
28. JS执行机制
[Sichuan University] information sharing of the first and second examinations
R 16 basic exercises
Rule engine mode Net open source project case
moderlarts第二次作业
A mechanics informed artistic neural network approach in data driven constructive modeling
Comp3411 -prolog language
Global Market Consulting - Research Report on the overall scale and application segmentation of the global HVDC converter station market in 2022