# Install Opencv with CUDA in Jetson Xavier NX
###### tags: `Jetson Xavier NX`
[TOC]
## Foreword
To install the Opencv with CUDA should setup from the source.
The Original System had the Opencv version 4.1.1 already but without CUDA so we need to reinstall the Opencv with the CUDA.
* Jetson Xavier NX
* OpenCV 4.1.1
* CUDA 10.2
## Installation Manual
```bash
git clone https://github.com/willy541222/buildOpenCV.git
```
```bash
cd buildOpenCV
```
```bash
./buildOpenCV.sh |& tee openCV_build.log
```
When installation is complete, you will need to relocate the .pc file (assuming the script default install path here) /usr/local/lib/pkgconfig/ and edit the file paths in the .pc file appropriately. Make sure you run:
```bash
sudo ldconfig -v
```
## Reference
* https://jetsonhacks.com/2019/11/22/opencv-4-cuda-on-jetson-nano/