-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use GPU? #1782
Comments
For FFmpeg, we can use codecs that support GPUs: https://trac.ffmpeg.org/wiki/HWAccelIntro For OpenCV, use GpuMat and UMat, that's what works on GPU. |
You'll need to use binaries for OpenCV compiled with CUDA, as shown in the README.md file here in the case of Maven: |
You'll need to make sure the latest version of the drivers for your video card are installed on the system. |
Set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more messages on the console. |
You'll need to set it earlier than that. Anyway, there's also issue #1767 that's been fixed recently, so make sure to give it a try with the snapshots: http://bytedeco.org/builds/ |
That means those functions don't work with GPUs. You'll need to find other (similar) functions that do support GPUs. In this case, this one should do what you need: http://bytedeco.org/javacpp-presets/opencv/apidocs/org/bytedeco/opencv/global/opencv_cudaimgproc.html#cvtColor-org.bytedeco.opencv.opencv_core.GpuMat-org.bytedeco.opencv.opencv_core.GpuMat-int-int-org.bytedeco.opencv.opencv_core.Stream- |
Duplicate of #1767 |
There's some library missing from your system, apparently. Please find out what it is using the Dependencies tool: |
You'll need to give it the correct path to the DLL, if that's what you mean, yes. Look inside the JAR file to make sure you have it correctly. |
I mean opencv_cudaimgproc can be loaded normally without UnstatisfiedLinkError |
So, everything should be working fine. I don't know what you tell you more. |
My system is Winows 11. Will this matter? |
I don't think so, but you can try it on Windows 10 to see if it makes a difference. |
Could it be that the package I imported is wrong? I found a same question on stackoverflow:https://stackoverflow.com/questions/56944945/javacv-with-java-lang-unsatisfiedlinkerror. |
That doesn't matter. Make sure the "org.bytedeco.javacpp.logger.debug" system property is set to "true" to get possibly useful information displayed on the console. |
It needs to be set earlier. |
These libraries failed to load. Debug: Loading library zlibwapi |
That just means the redist artifact isn't on the class path. You'll need to add it, or install CUDA on your machine.
|
I want to use gpu acceleration in ffmpeg and opencv mat. Is there any doucment or demo?
The text was updated successfully, but these errors were encountered: