Inpainting is the process of reconstructing damaged parts of images and videos. This process is also known as image or video interpolation. The basic idea is to simulate the process done by restorers with antiques. Nowadays, with the wide use of digital cameras, inpainting has become an automatic process that is used not only for image restoration by deleting scratches, but also for other tasks, such as object or text removal.
OpenCV supports an inpainting algorithm as of Version 2.4. The function for this purpose is:
void inpaint(InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, int flags): This restores the areas indicated with non-zero values by the
inpaintMaskparameter in the source (
src) image. The ...