shimat / opencvsharp

OpenCV wrapper for .NET
Apache License 2.0
5.36k stars 1.15k forks source link

How to use Gpu in opencvsharp? #581

Closed Jakvic closed 5 years ago

Jakvic commented 5 years ago

Hi,How to use gpu in opencvsharp

Environment

win10+vs2017+opencvsharp4.0.0

Example code:

using OpenCvSharp;
using OpenCvSharp.Cuda;
using static OpenCvSharp.Cv2;
namespace ConsoleCV
{
    class Mycv
    {
        public static void useGpu()
        {
            GpuMat gmat = new GpuMat(new Size(300,300),MatType.CV_8UC3,new Scalar(100,100,100));
            new Window("gpumat",WindowMode.Normal,gmat);
            WaitKey();
        }
    }
}

this is my device,device with cuda. device

wr

shimat commented 5 years ago

The GPU features' wrapper is almost unimplemented. Since GPU features require users to build themselves, general-purpose wrapper implementation is difficult. I am considering deleting OpenCvSharp.Gpu.

Jakvic commented 5 years ago

okay, i know, thank you.