Magic Inpainter is a tool for high quality image inpainting - removal of text, stains and unnecessary informations from images. During inpainting the tool preserves the background texture pattern. Magic Inpainter also performs many standard image processing tecniques which makes the outlining of the noice region quite easy, even if it contain several colors. Inpaint can be realized in two ways - with a new and inovative multidimensional context based image restoration algorithm or with a modification of the well-known smooth image filters like average, median, frost-glass and oil. The first inpaint method is slower but the inpaint quality is better, it has 3 level-of-detail /LOD/ which permits faster performance with a decrease of qualitry. The second inpainting approach is good for small defects - spots, points, lines, pepper noise. Both methods can be combined and used for clearing and restoration of corrupt images, remove of text and removal of big objects (the last is not possible when too much information is missing).
The purpose of the used restoration algorithms is to restore the noisy regions of the image in a natural way. The algorithms works better for textures but had also been tested successfully on various kind of photos. It can remove any kind of small and large monocolor regions from images. As long as they do not obscure unique and non-repeating important information they are restored, in most cases, without visual damage of the image. The algorithm preserves the background texture pattern, it preserves also the contours and edges.
The algorithm first describes the region of each non-noice pixel with a multi-dimensional key. This key should contain enough information about the pixel neighbourhood, pixels too close to image boundary or with too many noisy neighbours are excluded. All keys are sorted in special indexed list and then similar procedure is repeated for the noice pixels. For each noice pixel a similar multi-dimensional key is obtained. The keys describing the noisy pixels are then sorted depending of their non-noisy neighbours number. The pixels on the noise region boundary are put in the beginning of the list. When inpaint procedure is started these pixels are first restored. Then algorithm updates all keys with the new pixel values and resorts the noisy keys list. This repeats until all pixels are restored or if the procedure is canceled from the user. The missing pixels values are calculated from the pixels with most similar keys. To find these pixels the algorithm performs multi-dimensional search in the image keys list. In this way Magic Inpainter fills the missing pixels as first transforms the 2D image pixels to a multi-dimensional pixels in the feature-space, and then, when find the closest from it neighbours, replace its color with the nearest neighbour color value.