private void ThrowIfNotAvailable() { if (disposed) { throw new ObjectDisposedException(GetType().Name); } if (Cv2Gpu.GetCudaEnabledDeviceCount() < 1) { throw new OpenCvSharpException("GPU module cannot be used."); } }
/// <summary> /// Checks whether the opencv_gpu*.dll includes CUDA support. /// </summary> protected void ThrowIfNotAvailable() { if (IsDisposed) { throw new ObjectDisposedException(GetType().Name); } if (Cv2Gpu.GetCudaEnabledDeviceCount() < 1) { throw new OpenCvSharpException("Your OpenCV DLL does not support GPU module."); } if (!IsGpuCompatible) { throw new OpenCvSharpException("The selected GPU device is not compatible."); } }