are no patches in the neighborhood, which could be
used without getting a result with visible artifacts.
It is possible to increase the number and variety of
available patches by their photometrical or geometri-
cal transformation. The source patch (the patch from
the known area) can be rotated, scaled, flipped, or
its intensity can be adjusted to better match the tar-
get patch (the patch being reconstructed). There is a
large amount of literature using a certain degree of in-
variance in matching problems (Zitov
´
a and Flusser,
2003). For image reconstruction, these techniques
have been adopted in (Drori et al., 2003), where five
scales and eight orientations of the patches are tested
or in (Zhang et al., 2004), where projective transfor-
mation of patches are estimated.
This paper focuses on the problem of rotation in-
variance in patch matching. Rotating the source patch
several times and testing the proximity of each ori-
entation to the target patch is a very time consuming
task. In matching problems from other fields of image
processing, moment invariants are often used to per-
form the match effectively (Zitov
´
a and Flusser, 2003).
In exemplar-based image reconstruction, matching
based on moments is normally impossible, since the
target patches are incomplete and moments are cal-
culated from the whole patch. Our scratch inpainting
algorithm works in multiple resolutions. Inpainting
results from previous stages are refined afterwards.
Therefore, the mentioned difficulty can be overcome
by applying the moment invariants to patches from a
pre-inpainted image.
Patch matching and orientation estimation is much
faster using moment invariants. This is a novel ap-
proach, opening new possibilities in exemplar-based
reconstruction. Using the clue image for matching
patches containing fine details has to be justified,
which is a part of this paper.
This paper focuses solely on the particular prob-
lem of rotation invariance in exemplar-based inpaint-
ing. The method has been tested on gray-level im-
ages, however extension to color images should be
straightforward. Detailed explanation of the inpaint-
ing algorithm is not our objective. Although, scratch
inpainting is a temporal problem, here we limit our-
selves to the reconstruction of a single frame.
2 EXEMPLAR-BASED
INPAINTING ALGORITHM
In this section, exemplar-based inpainting as de-
scribed in (Criminisi et al., 2004) is shortly explained.
This serves as a starting point for a brief explanation
of our algorithm. The main motivation for modifi-
cations of the original exemplar-based algorithm was
to avoid artifacts in the middle of the inpainted do-
main, rising from lack of interaction between patches
copied to opposite sides of the unknown area. Images
shown in Fig. 2 are used in this paper. The scratches
are made artificially.
Figure 2: Images used for testing our algorithm. The
scratches are made artificially.
Exemplar-based inpainting algorithm according to
(Criminisi et al., 2004) works as follows: Pixels along
the border of the inpainted domain are sorted accord-
ing to priority, which is based on structure saliency
and on confidence of already inpainted pixels. A
block of pixels (due to later usage of rotation invari-
ance, we call it a patch) around the first pixel in the list
is called a target patch. A source patch of the same
size as the target patch is searched in a neighborhood
of a pre-determined size. The best match based on the
known pixels (or its part) is copied to the position of
the target patch. The priorities are updated and the
whole process is repeated. The algorithm is demon-
strated in Fig. 3.
The borders propagate inside the inpainted domain
and meet in the middle of it. Since there is no commu-
nication between them, it results in artifacts, examples
of which are shown in Fig. 4.
Our main improvements to the algorithm proposed
in (Criminisi et al., 2004) are using multiresolution,
clue images and invariant patch matching. Multireso-
lution helps to inpaint textures with different charac-
teristic sizes. It also partially alleviates artifacts pro-
duced in earlier lower-resolution stages. The image is
decomposed into Laplacian pyramid and the lowest-
resolution image is inpainted by the PDE method of
(Chan and Shen, 2001). The result is upsampled and
used as a clue in the next finer resolution.
VISAPP 2006 - IMAGE FORMATION AND PROCESSING
116