the redundant patterns, so all the shapes are not rel-
evant. Note that 1 x 1 cutting makes an exception
because it loses the spatial consistency, so it is never
used. Similarly, a sliding windowing is applied to the
image in order not to miss any stitching between the
patches. Though precise, this exhaustive enumeration
is expensive. So, to shorten it, exclusive or even ran-
dom windowing strategies could be considered. The
counting of the broken blocks leads to the building of
a dictionary D. It is composed of unique words asso-
ciated with their frequencies p
i
. These latter allow to
estimate the entropy H of the image.
3.3 Filling in the Selection
Based on such a dictionary, any missing pixel can be
replaced by looking for the patch - or the word fol-
lowing the point of view - that best fits the selection
around. Three cases can occur. There can be one, sev-
eral or no compatible words in the dictionary. Note
that the compatibility is checked on the known pixels
of the selection. It is calculated with the logic func-
tions NOT, XOR and AND as each piece of image is
stored as a set of Boolean. So, if there is only one
word, it is always taken. If there are several, the se-
lected one must minimize the absolute entropy devia-
tion. Finally, if no compatible word exists a new one
is created. It does not challenge the known part of the
selection. It only retains the consensus within the dic-
tionary concerning the unknown part. To conclude,
the whole process is summarized in algorithm 1 be-
low.
4 EXPERIMENTAL RESULTS
Our implementation has investigated dictionaries of
square patches. It can emulate the blind spot com-
pletion described in section 2 with an image of size
25x100 and patches of any size between 2x2 to 25x25
in this case. The results, grouped in figure 3 below,
correspond to a filling in with words of size 3x3.
We have also explored characteristic patterns like
crosses in order to see how to constrain the novelty
creation. This work has started with binary images
and was then extended to grayscale and RGB images
of any bit depth. Random images have equally pro-
cured a deep reflection. We first wanted to minimize
the entropy, not its absolute deviation. So we encoded
redundancy and thus destroyed information. As ran-
dom images are already at maximum entropy, regard-
less of their breaking down, we must maintain their
entropy constant to be able to reproduce their pattern.
Algorithm 1: Entropy Inpainting Algorithm.
input : unknown signal X
u
and known signal
X
k
such that X
u
∩ X
k
= ∅
output: X
u
completed so that
H
D
(X
u
,X
k
) ≈ H
D
(X
k
)
build a dictionary D from X
k
and calculate
H(X
u
) and H(X
k
);
while X
u
is not completed do
define an overlapping layer L between X
u
and X
k
;
while L is not completed do
define a selection S inside L ;
find the compatible words between S
and D;
if there is one candidate then
select this word;
else if there are several candidates then
select the word which minimizes
the absolute entropy deviation;
else // there is no candidate
create a new word compatible with
S and D;
end
fill in S with the returned word;
update X
u
, X
k
, D and recalculate H(X
u
)
and H(X
k
);
end
end
Finally we have tried to inpaint natural images taken
from the benchmark dataset proposed by (Kawai et
al., 2009) at: http://yokoya.naist.jp/research/ inpaint-
ing. Our RMSE values compare the inpainted image
to the original one within the completed region only.
They are not relevant to highlight the image global
consistency but they are good to compare the inpaint-
ing methods. We readily acknowledge that our imple-
mentation could highly be improved compared to the
others. Clearly we do not manage edges and complex
textures.
5 CONCLUSIONS
This paper has underscored the fact that Information
Theory can simply formulate the inpainting process
and precisely emulate the blind spot filling-in. It has
emphasized that the goal of inpainting is neither to
create nor to destroy information. Thus the inpaint-
ing process was reformulated within the Information
Theory framework under the form of an optimiza-
tion problem looking for both a dictionary and an un-
known signal. It aims to keep the entropy of the grow-
HowtouseInformationTheoryforImageInpaintingandBlindSpotFilling-in?
99