private static extern void cveOilPainting( IntPtr src, IntPtr dst, int size, int dynRatio, CvEnum.ColorConversion code);
private static extern void cudaCvtColor(IntPtr src, IntPtr dst, CvEnum.ColorConversion code, int dcn, IntPtr stream);
/// <summary> /// Oil Painting effect /// </summary> /// <param name="src">Input three-channel or one channel image (either CV_8UC3 or CV_8UC1)</param> /// <param name="dst">Output image of the same size and type as src.</param> /// <param name="size">Neighbouring size is 2-size+1</param> /// <param name="dynRatio">Image is divided by dynRatio before histogram processing</param> /// <param name="code">Color space conversion code(see ColorConversionCodes). Histogram will used only first plane</param> public static void OilPainting(IInputArray src, IOutputArray dst, int size, int dynRatio, CvEnum.ColorConversion code = ColorConversion.Bgr2Gray) { using (InputArray iaSrc = src.GetInputArray()) using (OutputArray oaDst = dst.GetOutputArray()) { cveOilPainting(iaSrc, oaDst, size, dynRatio, code); } }
/// <summary> /// Converts image from one color space to another /// </summary> /// <param name="src">The source GpuMat</param> /// <param name="dst">The destination GpuMat</param> /// <param name="code">The color conversion code</param> /// <param name="dcn">Number of channels in the destination image. If the parameter is 0, the number of the channels is derived automatically from src and the code .</param> /// <param name="stream">Use a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).</param> public static void CvtColor(IInputArray src, IOutputArray dst, CvEnum.ColorConversion code, int dcn = 0, Stream stream = null) { using (InputArray iaSrc = src.GetInputArray()) using (OutputArray oaDst = dst.GetOutputArray()) cudaCvtColor(iaSrc, oaDst, code, dcn, stream); }