# OpenCV 4.5

**URL:** <https://forums.developer.nvidia.com/t/opencv-4-5/161251>\
**Category:** Jetson Xavier NX\
**Tags:** opencv\
**Created:** [December 7, 2020, 10:27am UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251 "2020-12-07T10:27:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![colinalow](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@colinalow](https://forums.developer.nvidia.com/u/colinalow)\
**Post date:** [December 7, 2020, 10:27am UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/1 "2020-12-07T10:27:30Z")

</div>

I fired up my new Xavier NX (Jetpack 4.1.1) and discovered OpenCV4.1.1 was not CUDA enabled. I downloaded and built OpenCV 4.5 using the script here:

> **[GitHub - AastaNV/JEP](https://github.com/AastaNV/JEP)**
>
> Contribute to AastaNV/JEP development by creating an account on GitHub.

All went well, it installed, and CUDA is now enabled. However, it did not detect BLAS. I have scoured every forum and installed everything related to BLAS to no effect - the build does not detect it.

There is a suggestion that I build OpenBlas. However I see that Nvidia has an accelerated cuBLAS. So my question is: what is the best way to add BLAS to my OpenCV build? And are there any other accelerated libraries to use in place of standard libraries?

Thanks,  
Colin

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [December 7, 2020, 11:47am UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/2 "2020-12-07T11:47:57Z")

</div>

You would try adding `-D WITH_CUBLAS=1` to your cmake options.

---

<div class="post-metadata">

**Author:** ![colinalow](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@colinalow](https://forums.developer.nvidia.com/u/colinalow)\
**Post date:** [December 7, 2020, 2:13pm UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/3 "2020-12-07T14:13:44Z")

</div>

> > You would try adding `-D WITH_CUBLAS=1` to your cmake options.

Thank you, I will try that. And could you tell me if cuBLAS is present by default in Jetpack or do I need to install it from somewhere?

Thanks again :-)

---

<div class="post-metadata">

**Author:** ![Andrey1984](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/andrey1984/32/14130_2.png) [@Andrey1984](https://forums.developer.nvidia.com/u/Andrey1984)\
**Post date:** [December 7, 2020, 4:16pm UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/4 "2020-12-07T16:16:07Z")

</div>

> [@nvblas for Jetson TX2 or another way to run Armadillo code with cublas](https://forums.developer.nvidia.com/t/nvblas-for-jetson-tx2-or-another-way-to-run-armadillo-code-with-cublas/60934/5):
>
> ibcublas.so is included in the CUDA toolkit.  
> Please use JetPack to install CUDA toolkit since the compatible driver is only available in the JetPack OS image.

ref: [nvblas for Jetson TX2 or another way to run Armadillo code with cublas - #5 by AastaLLL](https://forums.developer.nvidia.com/t/nvblas-for-jetson-tx2-or-another-way-to-run-armadillo-code-with-cublas/60934/5)

---

<div class="post-metadata">

**Author:** ![Honey\_Patouceul](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/honey_patouceul/32/389777_2.png) [@Honey\_Patouceul](https://forums.developer.nvidia.com/u/Honey_Patouceul)\
**Post date:** [December 7, 2020, 6:30pm UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/5 "2020-12-07T18:30:22Z")

</div>

> [@colinalow](#):
>
> And could you tell me if cuBLAS is present by default in Jetpack or do I need to install it from somewhere?

It should be there. You may just check with:

```auto
sudo apt search cublas
Sorting... Done
Full Text Search... Done
libcublas-dev/unknown,stable,now 10.2.2.89-1 arm64 [installed,automatic]
  CUBLAS native dev links, headers

libcublas10/unknown,stable,now 10.2.2.89-1 arm64 [installed,automatic]
  CUBLAS native runtime libraries
...

```

---

<div class="post-metadata">

**Author:** ![colinalow](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@colinalow](https://forums.developer.nvidia.com/u/colinalow)\
**Post date:** [December 7, 2020, 7:07pm UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/6 "2020-12-07T19:07:16Z")

</div>

It was there, as you describe, same version. Many thanks.

Colin

---

<div class="post-metadata">

**Author:** ![Andrey1984](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/andrey1984/32/14130_2.png) [@Andrey1984](https://forums.developer.nvidia.com/u/Andrey1984)\
**Post date:** [December 7, 2020, 9:27pm UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/7 "2020-12-07T21:27:33Z")

</div>

@colinalow  
another handy tool to find a file with certain name on the local filesystem is `mlocate’

```auto
sudo apt install -y mlocate
 sudo updatedb
locate cublas | grep .so
/usr/lib/aarch64-linux-gnu/libcublas.so
/usr/lib/aarch64-linux-gnu/libcublas.so.10
/usr/lib/aarch64-linux-gnu/libcublas.so.10.2.2.89
/usr/lib/aarch64-linux-gnu/libcublasLt.so
/usr/lib/aarch64-linux-gnu/libcublasLt.so.10
/usr/lib/aarch64-linux-gnu/libcublasLt.so.10.2.2.89
/usr/lib/aarch64-linux-gnu/stubs/libcublas.so
/usr/lib/aarch64-linux-gnu/stubs/libcublasLt.so
/usr/local/cuda-10.2/doc/man/man7/libcublas.so.7
```

---

<div class="post-metadata">

**Author:** ![colinalow](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@colinalow](https://forums.developer.nvidia.com/u/colinalow)\
**Post date:** [December 9, 2020, 1:20pm UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/8 "2020-12-09T13:20:51Z")

</div>

Thanks for your help :-)

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:42pm UTC](https://forums.developer.nvidia.com/t/opencv-4-5/161251/9 "2021-10-18T18:42:41Z")

</div>

Closed on October 18, 2021, 6:42pm UTC


