Professional Documents
Culture Documents
δS
δS pixels; С (δS ) is the confidence term; D (δS ) is the data
term; ΨδS is the adaptive patch of pixels centered at the
(a) (b) pixel δSi , j ; ΨδS is the number of pixels in the adaptive
Fig. 1. The image model.
patch ΨδS ; ∇I δ⊥S is a vector orthogonal to the gradient at
3. THE PROPOSED ALGORITHM the point δSi , j ; nδS is a vector orthogonal to the boundary
The proposed algorithm is a modification of the example- δS at the point δSi , j ; and α is a normalization factor
based image inpainting method proposed by Criminisi et al. ( α = 255 for a typical grey-level image)).
[6]. The exemplar-based method (EBM) uses a priority
function to select the best patch and copy it to fill-in regions.
Such an approach allows propagating an edge and a
structure in the first instance.
One of the major problems in exemplar-based method is
a process of searching the patch with the maximum
similarity to a selected patch using mean squared error
metric. As a result, the algorithm will produce visually poor
result. Thus, the criterion to search the best match, such as
the Euclidean metric for pixel brightness, may lead for some
images to uncorrected reconstruction since a method ignores
the textural characteristics of the patches.
The purpose of this work is to modify an exemplar-
based method in order to overcome above mentioned
drawbacks of EBM. We propose to use multiple criteria for
a patch similarity search since often in practice existed
exemplar-based methods produce unsatisfactory results. The
criteria for searching the best matching uses several terms,
including Euclidean metric for pixel brightness and chi-
squared histogram matching distance for local binary
patterns. A combined use of textural geometric
characteristics together with color information allows to get
more informative description of the patches.
We summarize the algorithm in the following scheme
(figure 2). Fig.2. The proposed inpainting algorithm.
Below we will describe all building blocks of the
proposed algorithm. 3.2. Defining a pixel with a maximum priority
3.1. Calculating the priority Define a pixel with a maximum priority on the border of the
missing region.
A priority value is computed for each value of the pixel
boundary consisting of the confidence term and the data 3.3. Defining a restored patch
term. Calculating the priority using the expression allows
giving larger weights to pixels that are on the differences of Define the square patch Ψ p with a center in the pixel with a
brightness (the boundaries), thus restoring them first. The maximum priority.
confidence term sets lower weights to the restored pixels
with increasing distance from the true pixels of the region. 3.4. Calculating Euclidean metrics for true pixels and
A priority value P(δS ) is computed for each value of the restored patch
659
On the true image S we find a patch ψ q , for which the 3.9. Patch restoration using minimum error boundary cut
Euclidean metric is minimal:
To reduce the visibility boundaries on the reconstructed
DE (Ψ p , Ψq ) = ∑ (Ψ p − Ψq ) 2
→ min . image between similar patches in EBM we use the
algorithm for texture synthesis proposed by Efros and
freeman instead of simple copy-and-paste procedure. It
3.5. Calculating the LBP
allows optimizing an overlap region between patches using
We have utilized the local binary patterns (LBP) as a texture minimum error boundary cut (figure 3).
descriptor for patches in image. The basic LBP operator is The confidence data for the restored pixels is assigned to
calculated by a thresholding of each pixel around the central the current value C ( p ) . After this a procedure of calculation
pixel in a local 3x3 pattern [8]. of priority and searching for similar patches with subsequent
replacement repeats.
3.6. Forming a histogram
ψ p ψ q ψ p
ψ q
Among all possible binary patterns formed by LBP operator,
only 9 uniform patterns are used for analysis. Therefore, the
histogram of the uniform patterns in a local region forms a
powerful descriptor used to analyze the local regions in Fig. 3. Minimum error boundary cut.
image. The histogram is formed for every local area Ψ p , Ψq
and used as a feature descriptor. 4. RESULTS
3.7. Calculating the Chi-squared histogram matching In figures 4-6 examples of an image reconstruction (a -
original image, b - the image with a mask, c - the image
To determine the correspondence between the histograms reconstructed by the Telea method (TM), d - the image
have been proposed the Chi-squared histogram matching reconstructed by the EBM, e - the image reconstructed by
distance in [9]: the proposed method) are given.
1
K h (
Ψ p ( m) − hΨq ( m)
2
) A main feature of test image «Flowers» is the fact that
2
χ (hΨ p , hΨq ) = ⋅ ∑
2 m =1 hΨ p (m) + hΨq (m)
, the regions with missing pixels located at the intersection of
the curve boundaries that need to be extrapolated, are
where hΨ p and hΨq are the histogram of LBP for Ψ p and connected to the opposite border. The proposed method
allows the correct reconstruction of pixel values. The TM
Ψq patches, respectively. blurs same regions and the EBM is fail in restoration in the
absence of similar blocks.
3.8. Searching similar patch using multiple criteria A feature of the test image «Lighthouse» is that the area
with missing pixels is located at the intersection of the
For the multiple criteria, we have used Euclidean metric for borders separating the texture and non texture. The results
pixel brightness and Chi-squared histogram matching show that the proposed method can correctly restore the
distance for local binary patterns in the form: structure and texture regions.
Others examples presented in this paper demonstrate the
F = (1 − β ) ⋅ DE ( Ψ p , Ψq ) + β ⋅ χ 2 ( hΨ p , hΨq )
→ min ,
effectiveness of the algorithm in restoration of the test
where β is a weight coefficient. images having different geometrical characteristics.
A proper selection of the coefficient β in multiple The proposed method allows to synthesize the texture
with a simultaneous reconstruction of an image structure.
criteria proposed in [9]. This weighting factor can vary from
It's worth noting that the method does not smear the texture
0 to 1. If β = 0 then as a measure of proximity for and the structure during the restoration of large areas of
searching a similar patch only Euclidean metric is used, and missing pixels.
if β = 1 then we use chi-squared histogram matching Table 1 shows numerical comparison of three methods,
distance for local binary patterns. Analysis of the TM, EBM and the proposed one, in terms of Root Mean
experimental results demonstrate that the modified Square Error (RMSE). Note, that for EBM parameters are set
exemplar-based method may reduce the error of image to provide best numbers for the considered test images. It is
reconstruction in average by 18% when the weight worth noting that the error values confirm the visual analysis.
coefficient is set to β = 0,25 . the proposed method provides smaller reconstruction errors,
on average 30-80% less than the processing of EBM and
TM.
660
5. CONCLUSION
REFERENCES
661