/// <summary> /// Restores the selected region in an image using the region neighborhood. /// </summary> /// <param name="src">Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image.</param> /// <param name="inpaintMask">Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted.</param> /// <param name="dst">Output image with the same size and type as src.</param> /// <param name="inpaintRadius">Radius of a circular neighborhood of each point inpainted that is considered by the algorithm.</param> /// <param name="flags">Inpainting method that could be cv::INPAINT_NS or cv::INPAINT_TELEA</param> public static void Inpaint(InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, InpaintMethod flags) { if (src == null) { throw new ArgumentNullException(nameof(src)); } if (inpaintMask == null) { throw new ArgumentNullException(nameof(inpaintMask)); } if (dst == null) { throw new ArgumentNullException(nameof(dst)); } src.ThrowIfDisposed(); inpaintMask.ThrowIfDisposed(); dst.ThrowIfNotReady(); NativeMethods.HandleException( NativeMethods.photo_inpaint(src.CvPtr, inpaintMask.CvPtr, dst.CvPtr, inpaintRadius, (int)flags)); dst.Fix(); GC.KeepAlive(src); GC.KeepAlive(inpaintMask); }
/// <summary> /// restores the damaged image areas using one of the available intpainting algorithms /// </summary> /// <param name="src"></param> /// <param name="inpaintMask"></param> /// <param name="dst"></param> /// <param name="inpaintRadius"></param> /// <param name="flags"></param> public static void Inpaint(InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, InpaintMethod flags) { if (src == null) throw new ArgumentNullException("src"); if (inpaintMask == null) throw new ArgumentNullException("inpaintMask"); if (dst == null) throw new ArgumentNullException("dst"); src.ThrowIfDisposed(); inpaintMask.ThrowIfDisposed(); dst.ThrowIfNotReady(); NativeMethods.photo_inpaint(src.CvPtr, inpaintMask.CvPtr, dst.CvPtr, inpaintRadius, (int)flags); dst.Fix(); }
/// <summary> /// restores the damaged image areas using one of the available intpainting algorithms /// </summary> /// <param name="src"></param> /// <param name="inpaintMask"></param> /// <param name="dst"></param> /// <param name="inpaintRadius"></param> /// <param name="flags"></param> public static void Inpaint(InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, InpaintMethod flags) { if (src == null) { throw new ArgumentNullException("src"); } if (inpaintMask == null) { throw new ArgumentNullException("inpaintMask"); } if (dst == null) { throw new ArgumentNullException("dst"); } src.ThrowIfDisposed(); inpaintMask.ThrowIfDisposed(); dst.ThrowIfNotReady(); NativeMethods.photo_inpaint(src.CvPtr, inpaintMask.CvPtr, dst.CvPtr, inpaintRadius, (int)flags); dst.Fix(); }
public static extern void cvInpaint(IntPtr src, IntPtr mask, IntPtr dst, double inpaintRadius, InpaintMethod flags);
internal static extern void cvInpaint(Arr src, Arr inpaint_mask, Arr dst, double inpaintRange, InpaintMethod flags);
private void radioButton2_CheckedChanged(object sender, EventArgs e) { iMethod = InpaintMethod.Telea; }
/// <summary> /// Restores the selected region in an image using the region neighborhood. /// </summary> /// <param name="src">Input 8-bit 1-channel or 3-channel image.</param> /// <param name="inpaintMask"> /// Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted. /// </param> /// <param name="dst">Output image with the same size and type as <paramref name="src"/>.</param> /// <param name="inpaintRange"> /// Radius of a circular neighborhood of each point inpainted that is considered by the algorithm. /// </param> /// <param name="flags">Specifies the inpainting method.</param> public static void Inpaint(Arr src, Arr inpaintMask, Arr dst, double inpaintRange, InpaintMethod flags) { NativeMethods.cvInpaint(src, inpaintMask, dst, inpaintRange, flags); }