1051-8215 (c) 2016 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TCSVT.2017.2720175, IEEE
Transactions on Circuits and Systems for Video Technology
3
Level 3
Level 2
Level 1
Level 0
Coarse to fine
Fig. 3. Overview of the proposed CPM algorithm. After the construction of the pyramid, we choose seed points on each level (simple grid). The red circles
represent the seeds, and the neighbor propagation is performed between adjacent seeds (black arrows) to propagate good matches to adjacent seeds. For the
coarse-to-fine scheme, the seeds on lower levels are initialized by higher-level seeds (red arrows).
Fig. 4. Example of PatchMatch on grid structure. Each column shows, from
top to bottom, the mean of two consecutive images, the ground truth and
the matching results of CPM with d = 11. Note that even with a large grid
spacing, the result captures most of the motion details.
(top-down) scheme. An overview of CPM matching is given in
Figure 3. We first discuss PatchMatch in Section III-A and then
detail the matching procedure for one level of the pyramid in
Section III-B. Finally, we describe the hierarchical structures
of our approach, as well as the propagation between the levels,
in Section III-C.
A. PatchMatch
The objective of NNF algorithms is to find the most
similar patch of all the patches in one image against another
under some patch distance metric. Connelly et al. proposed
a randomized algorithm, called PatchMatch [5], to efficiently
compute the approximate NNF.
PatchMatch has three main components. First, every pixel in
the image is initialized with either random matching offsets or
some prior information. Next, an iterative refinement process is
applied over every pixel in an interleaved zig-zag and reverse
zig-zag manner, in which good matches are propagated to
adjacent pixels, followed by random search near the current
best matching offset.
neighborhood propagation and random search are the core
ideas of PatchMatch. Propagation is performed under the
assumption that the patch offsets are likely to be the same. For
example, if there is a good match near a pixel, the matching
of this pixel will be updated by the matching of the neighbor
if the patch distance (according to some patch distance metric)
of the neighbor is smaller. After propagation, a sequence of
randomly selected candidate offsets will be tested to improve
the current matching. The propagation and random search are
performed iteratively until convergence occurs or some fixed
iteration numbers are achieved. We refer readers to [5] for
more detailed information.
PatchMatch has shown clear advantages in scene corre-
spondence [8] and structural image editing [5]. However, the
computed NNF is often very noisy because of the lack of
global regularization. We introduce a coarse-to-fine structure
within the PatchMatch framework, which can reduce the noise
significantly (see Figure 1(d)).
B. PatchMatch on Grid Structure
Considering the nature of the smoothness of optical flow
compared with that of the NNF, we define our goal of matching
as finding the best match of some seeds rather than every
pixel of the image for efficiency. Formally, given two images
I
1
, I
2
⊂ R
2
and a collection of seeds S = {s
m
} at position
{p(s
m
)}, our goal is to determine the flow of each seed
f(s
m
) = M(p(s
m
)) − p(s
m
) ∈ R
2
, where M(p(s
m
)) is
the corresponding matching position in I
2
for seed s
m
in I
1
.
In our method, the seeds are the cross points of the regular
image grid with a spacing of d pixels. Then, there is only one
seed in every d × d non-overlapping block (see Figure 4). We
will show that this fast approximation results in a significant
speed-up with controllable accuracy.
Adopting the regular image grid, we obtain a default neigh-
bor system according to the spatial adjacency of the seeds on
the image grid. As in PatchMatch, neighborhood propagation