赞
踩
Jetson Xavier NX配置全过程——系统与SDK烧录(一)
Jetson Xavier NX配置全过程——安装jtop和OpenCV4.5.3(二)
Jetson Xavier NX配置全过程——D435i驱动安装(三)
目录
3、下载 OpenCV 和 opencv_contrib 源码
通过Jetson SDK Components安装的OpenCV 4.1.1版本是不带 CUDA 加速的,无法充分利用 NX 的 GPU 性能,所以先卸载OpenCV 4.1.1后再安装OpenCV 4.5.3。
jtop工具在查看jetson边缘计算产品的cpu,gpu,以及内存使用率时非常方便,而且还能查看cuda,cudnn,opencv等相关工具的详细版本号,基本是使用jetson边缘计算产品必装的工具。
我们使用python3的安装方式
- sudo apt install python3-pip
- sudo -H pip3 install jetson-stats
- sudo systemctl restart jetson_stats.service
安装后重启,即可以使用
sudo apt purge libopencv*
sudo apt autoremove
sudo apt update
在终端输入以下命令:
sudo apt install -y build-essential checkinstall cmake pkg-config yasm git gfortran
sudo apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
sudo apt install -y libjpeg8-dev libjasper-dev libpng12-dev libtiff5-dev libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libv4l-dev
sudo apt install -y libgtk2.0-dev libtbb-dev libatlas-base-dev libfaac-dev libmp3lame-dev libtheora-dev libvorbis-dev libxvidcore-dev libopencore-amrnb-dev libopencore-amrwb-dev x264 v4l-utils
sudo apt install -y python-dev python-numpy libtbb2 libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
sudo apt update
不出意外应该会报错:E: 无法定位软件包 librealsense2-dkms,这时候我们换源即可解决问题。
将以前的源备份一下,以防以后可以用的。
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
使用gedit打开文档。
sudo gedit /etc/apt/sources.list
将下边的清华源复制进去,然后点击保存关闭。
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main universe restricted
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main universe restricted
-
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
- deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe
- deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe
更新软件列表。
sudo apt update
1、源码下载
分别前往 OpenCV 和 opencv_contrib 的 github 仓库下载源码 ( 本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/468633
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。