# How to get opencv-contrib binary package with CUDA

**URL:** <https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708>\
**Category:** Python\
**Tags:** build, cuda, contrib\
**Created:** [December 13, 2021, 10:38am UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708 "2021-12-13T10:38:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aipatrone](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aipatrone](https://forum.opencv.org/u/aipatrone)\
**Post date:** [December 13, 2021, 10:38am UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708/1 "2021-12-13T10:38:24Z")

</div>

> [@Need some help with CUDA Optical Flow in Python](https://forum.opencv.org/t/need-some-help-with-cuda-optical-flow-in-python/2868/1):
>
> ```auto
> brox_of = cv2.cuda_BroxOpticalFlow.create(0.197, 50.0, 0.8, 10, 77, 10) 
> 
> ```

Could please tell me how you manage to have this method? The only opencv\_contrib that I find available is only for cpu and if I use the opencv\_python it doesn´t recognize this method.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [December 13, 2021, 10:45am UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708/2 "2021-12-13T10:45:51Z")

</div>

Did you build with CUDA support?

`-DWITH_CUDA=ON`

---

<div class="post-metadata">

**Author:** ![aipatrone](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aipatrone](https://forum.opencv.org/u/aipatrone)\
**Post date:** [December 13, 2021, 1:01pm UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708/3 "2021-12-13T13:01:13Z")

</div>

I simply installed with pip the python packages

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [December 13, 2021, 1:06pm UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708/4 "2021-12-13T13:06:27Z")

</div>

If you want CUDA support you need to build yourself. The contrib module contains the CUDA modules however the [opencv\_contrib](https://pypi.org/project/opencv-contrib-python/) python wheel is not built with CUDA support.

> Check the manual build section if you wish to compile the bindings from source to enable additional modules such as CUDA.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [December 13, 2021, 2:28pm UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708/5 "2021-12-13T14:28:50Z")

</div>

there are no prebuilt opencv libs with cuda support,  
you will have to build this from src (with cuda sdk installed)

> **[GitHub - opencv/opencv\_contrib: Repository for OpenCV's extra modules](https://github.com/opencv/opencv_contrib/)**
>
> Repository for OpenCV's extra modules. Contribute to opencv/opencv\_contrib development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![aipatrone](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@aipatrone](https://forum.opencv.org/u/aipatrone)\
**Post date:** [December 13, 2021, 3:35pm UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708/6 "2021-12-13T15:35:28Z")

</div>

this is a pity, it would be really useful

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [August 10, 2023, 7:19am UTC](https://forum.opencv.org/t/how-to-get-opencv-contrib-binary-package-with-cuda/6708/7 "2023-08-10T07:19:49Z")

</div>

Split this topic on August 10, 2023, 7:19am UTC

2 posts were split to a new topic: [Comprehensible instructions to build contrib with CUDA](https://forum.opencv.org/t/comprehensible-instructions-to-build-contrib-with-cuda/14204)
