# Own server for Java programms to use the NVidia GPU

**URL:** <https://forum.opencv.org/t/own-server-for-java-programms-to-use-the-nvidia-gpu/12978>\
**Category:** Android/Java\
**Created:** [April 27, 2023, 1:37pm UTC](https://forum.opencv.org/t/own-server-for-java-programms-to-use-the-nvidia-gpu/12978 "2023-04-27T13:37:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [April 28, 2023, 5:44am UTC](https://forum.opencv.org/t/own-server-for-java-programms-to-use-the-nvidia-gpu/12978/2 "2023-04-28T05:44:55Z")

</div>

> [@trausch](#):
>
> I use OpenCV under Java, I wanted to ask whether I can also use performance gains there if I compile OpenCV like this.

unfortunately, no (or, not so easy)  
you need to use special api’s / classes to use CUDA/OpenCL code, which are not exposed to the java api

IF you’re good with c++, you can still wrap your gpu pipeline into JNI code, and call that from java

> [@trausch](#):
>
> SURF detector = SURF.create(…

this is cpu only, to use the CUDA optimization, you need [a different api](https://docs.opencv.org/4.x/db/d06/classcv_1_1cuda_1_1SURF__CUDA.html) – but again, no java bindings ;(

---

_[View the full topic](https://forum.opencv.org/t/own-server-for-java-programms-to-use-the-nvidia-gpu/12978)._
