简体   繁体   中英

How to accelerate OpenCvSharp3 with Cuda?

How do you enable CUDA acceleration with OpenCvSharp3? Documentation is non-existant. Do I have to install some prebuilt OpenCV CUDA libraries? Do I have to modify my code to use CUDA acceleration?

var input = new OpenCvSharp.Mat(filename, OpenCvSharp.ImreadModes.GrayScale);
var output = input.EmptyClone();
OpenCvSharp.Cv2.Sobel(input, output, OpenCvSharp.MatType.CV_8U, 1, 1);

They removed the support in the latest version of OpenCvSharp3

OpenCvSharp does not support CUDA. If you want to use the CUDA features, you need to customize the native bindings yourself. source

There are, however, implementations of OpenCvSharp.Cuda.GpuMat from the old version 2, a quick search on GitHub may help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM