Reconstructs the selected image area from the pixel near the area boundary. The function may be used to remove dust and scratches from a scanned photo, or to remove undesirable objects from still images or video.

C# | Visual Basic | Visual C++ |
public static void cvInpaint( IntPtr src, IntPtr mask, IntPtr dst, INPAINT_TYPE flags, double inpaintRadius )
Public Shared Sub cvInpaint ( _ src As IntPtr, _ mask As IntPtr, _ dst As IntPtr, _ flags As INPAINT_TYPE, _ inpaintRadius As Double _ )
public: static void cvInpaint( IntPtr src, IntPtr mask, IntPtr dst, INPAINT_TYPE flags, double inpaintRadius )

- src (IntPtr)
- The input 8-bit 1-channel or 3-channel image
- mask (IntPtr)
- The inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted
- dst (IntPtr)
- The output image of the same format and the same size as input
- flags (INPAINT_TYPE)
- The inpainting method
- inpaintRadius (Double)
- The radius of circlular neighborhood of each point inpainted that is considered by the algorithm