https://github.com/qengineering/install-opencv-jetson-nano
OpenCV installation script with CUDA and cuDNN support
https://github.com/qengineering/install-opencv-jetson-nano
cuda cudnn jetson-nano jetson-xavier opencv opencv4
Last synced: 30 days ago
JSON representation
OpenCV installation script with CUDA and cuDNN support
- Host: GitHub
- URL: https://github.com/qengineering/install-opencv-jetson-nano
- Owner: Qengineering
- License: bsd-3-clause
- Created: 2021-06-10T10:27:24.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-12T09:32:47.000Z (4 months ago)
- Last Synced: 2025-03-28T07:09:35.717Z (about 1 month ago)
- Topics: cuda, cudnn, jetson-nano, jetson-xavier, opencv, opencv4
- Language: Shell
- Homepage: https://qengineering.eu/install-opencv-on-jetson-nano.html
- Size: 80.1 KB
- Stars: 164
- Watchers: 5
- Forks: 58
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Install-OpenCV-Jetson-Nano
## OpenCV installation script for a Jetson (Orin) Nano
[](https://opensource.org/licenses/BSD-3-Clause)
This is the full setup of OpenCV with CUDA and cuDNN support for the Jetson Nano.
The script will detect if you are working on a regular Nano, or with the new Orin Nano.
For more information see [Q-engineering - Install OpenCV Jetson Nano](https://qengineering.eu/install-opencv-4.5-on-jetson-nano.html)------------
## Installing OpenCV.
Your Nano's default memory (4 GB RAM + 2 GB swap) is not enough for a quick build.
In this case, the compilation will be done by 1 core, which will take a long time.
It would be best if you had more memory allocated to your Nano for the fast 4-core build.
```
# check your total memory (RAM + swap) for a fast build. You need at least a total of:
# OpenCV 4.10.0 -> 8.5 GB!
# OpenCV 4.9.0 -> 8.5 GB!
# OpenCV 4.8.0 -> 8.5 GB!
# OpenCV 4.7.0 -> 8.5 GB!
# OpenCV 4.6.0 -> 8.5 GB!
# OpenCV 4.5.5 -> 8.5 GB!
# OpenCV 4.5.4 -> 8.5 GB!
# OpenCV 4.5.3 -> 8.5 GB!
# OpenCV 4.5.2 -> 8.5 GB!
# OpenCV 4.5.1 -> 6.5 GB
# OpenCV 4.5.0 -> 6.5 GB
# If not, enlarge your swap space as explained in the guide,
# or only 1 core is used for the compilation.
$ free -m$ wget https://github.com/Qengineering/Install-OpenCV-Jetson-Nano/raw/main/OpenCV-4-10-0.sh
$ sudo chmod 755 ./OpenCV-4-10-0.sh
$ ./OpenCV-4-10-0.sh
```
:point_right: Don't forget to reset your swap memory afterwards.------------
If you want to beautify OpenCV with the Qt5 GUI, you need to
- $ sudo apt-get install qt5-default
- Set the -D WITH_QT=**ON** \ (± line 62) in the script
before running the script on your Nano------------
OpenCV will be installed in the `/usr` directory, all files will be copied to the following locations:
- `/usr/bin` - executable files
- `/usr/lib/aarch64-linux-gnu` - libraries (.so)
- `/usr/lib/aarch64-linux-gnu/cmake/opencv4` - cmake package
- `/usr/include/opencv4` - headers
- `/usr/share/opencv4` - other files (e.g. trained cascades in XML format)------------
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CPZTM5BB3FCYL)