B Conejo
email: bconejo@

S Leprince
email: leprincs@

F Ayoub
email: fayoub@gps.

Jean-Philippe P Avouac
email: avouac@gps.caltech.edu

Fast global stereo matching via energy pyramid minimization

Keywords: Photogrammetry, Global, Matching, Multiresolution, Algorithms, Estimation, DEM/DTM

INTRODUCTION

Precise Digital Surface Models (DSM) are widely employed in urban monitoring, geological surveys, architecture, or archeology. DSM are now mostly generated using remote sensing surveys based on optical stereo-imaging, interferometric Synthetic Aperture Radar (SAR), or Light Detection And Ranging (LiDAR) acquisitions [START_REF] Li | Digital terrain modelingprinciples and methodology[END_REF]. In this paper, we focus on optical stereo-imaging.

The volume of available optical aerial and satellite images has sky-rocketed during this last decade. Moreover, the resolution and the size of these images have also vastly increased, and it is now common for satellites with push-broom sensors to produce images of more than 35,000 × 30,000 pixels with resolution up to 50 cm Ground Sampling Distance (GSD) (Worldview, 2014). Aerial imaging with frame camera achieve resolution better than 10 cm GSD with 20,000 × 13,000 pixels per images (UtraCam, 2014).

DSM with impressive accuracy and resolution can now been computed using multi-stereo pairs (Acute3D, 2014, 123DCatch, 2014, UtraMap, 2014, Pix4d, 2014[START_REF] Micmac | [END_REF], such techniques are based on the redundancy of view points as one ground point is viewed by up to hundred of images. We work in a slightly different context where only one stereo-pair is available, which is typical of satellite imagery.

DSM computation from stereo pairs involves a number of steps described for instance in [START_REF] Hartley | Multiple View Geometry in Computer Vision[END_REF]): calibration, aerotriangulation, eventually rectification, and then the estimation of the disparity map; finally, the DSM is computed from the geometry of acquisition and the estimated disparity map. In this paper, we only focus on the estimation of the disparity map in epipolar geometry [START_REF] Zhang | Determining the epipolar geometry and its uncertainty: A review[END_REF].

Numerous methods have been designed to estimate disparity maps e.g. [START_REF] Scharstein | A taxonomy and evaluation of dense two-frame stereo correspondence algorithms[END_REF][START_REF] Brown | Advances in computational stereo[END_REF][START_REF] Ansar | Enhanced realtime stereo using bilateral filtering[END_REF][START_REF] Tombari | Classification and evaluation of cost aggregation methods for stereo correspondence[END_REF]. State of the art approaches estimate disparity maps by defining an energy to minimize, which commonly enforces a notion of matching and a notion of regularity on the disparity maps. To speed up the computation, the photogrametry community has developed semi-global matching approaches (Hirschmuller, 2005, Pierrot-deseilligny and[START_REF] Pierrot-Deseilligny | A multiresolution and optimization-based image matching approach: An application to surface reconstruction from spot5-hrs stereo imagery[END_REF]) that compute local optimum solutions along different directions and aggregate them together. However, no mathematical guarantee has been given on the aggregation of local solutions to form a global optimum. Under different constraints, the computer vision community has developed more advanced techniques to globally optimize the matching problem [START_REF] Szeliski | A comparative study of energy minimization methods for markov random fields with smoothness-based priors[END_REF][START_REF] Kappes | A comparative study of modern inference techniques for discrete energy minimization problems[END_REF]. These techniques called global matching are mathematically more sound than semi-global matching as they guarantee a near global optimum [START_REF] Boykov | Fast approximate energy minimization via graph cuts. Pattern Analysis and Machine Intelligence[END_REF]. However, due to their computational complexity, they have only been applied to small images, i.e., less than 1000 × 1000 pixels, as proof of concept [START_REF] Middleburry | [END_REF][START_REF] Klaus | Segment-based stereo matching using belief propagation and a self-adapting dissimilarity measure[END_REF][START_REF] Kolmogorov | Computing visual correspondence with occlusions using graph cuts[END_REF] and are not yet scalable to accommodate the large sizes of remote sensing images. Very recently, the discrete optimization community has started to show some interest for variable grouping as a technique to solve global optimization more efficiently, [START_REF] Bagon | A multiscale framework for challenging discrete optimization[END_REF][START_REF] Komodakis | Towards More Efficient and Effective LP-Based Algorithms for MRF Optimization[END_REF][START_REF] Kim | Variable grouping for energy minimization[END_REF]. However, only results from (Middleburry, 2014) have been presented for stereo imagery.

Our contribution is to bring the global matching techniques up to the dimensionality of remote sensing data and to offer the photogrammetry community a sound mathematical framework both in terms of modeling and optimization. In this paper, we describe how to estimate disparity maps based on energy minimization. Then, we propose an algorithm to efficiently solve such optimization problems with a multiscale approach based on an energy pyramid rather than the traditional image pyramid. Finally, we demonstrate the improvements of our approach through an application to real stereo acquisitions.

THE STEREO MATCHING PROBLEM

Probability formulation

Let Ir be a reference image and G = (V, E) its associated graph. The set of nodes V consists of the pixels of Ir and the set of edges E is defined by the 4 connectivity as illustrated in Fig. 1 ) . We measure how a given d fits the data Ir and It by defining:

D = (R × R) card(V
P (d|Ir, It). ( 1
)
The definition of P is context dependent, but most approaches enforce: (1) a notion of the similarity between Ir and It •(id+d) (where id refers to the identity operator) by expressing PM (d|Ir, It) and;

(2) a notion of regularity for d by expressing PR(d|Ir). If we suppose that these two probabilities are independent, we can write:

P (d|Ir, It) = PM (d|Ir, It)PR(d|Ir). (2)
Instead of directly working with probabilities, we prefer using the energy domain as it is easier to define a measure on images. One can simply relate probability density function to energy via the Gibbs measure:

P (X = x) = 1 Z exp(-E(x)), (3)
With Z being a normalization factor so that the integral of the probability function equal to 1.

Energy formulation

Through Eq. 3, we relate E, EM , and ER to P , PM , and PR respectively, which gives the following energy:

E(d) = p∈V EM (d, p) + pq∈E ER(d, p, q). (4)
We define a pixel-wise similarity measure based on the similarity function ρ. Commonly used similarity functions are L1 or L2 norms [START_REF] Birchfield | A pixel dissimilarity measure that is insensitive to image sampling[END_REF], Normalized Cross Correlation (NCC) or Zero Normalized Cross Correlation (ZNCC) [START_REF] Brown | A survey of image registration techniques[END_REF], and the different versions of the Mutual Information [START_REF] Viola | Alignment by maximization of mutual information[END_REF][START_REF] Kim | Visual correspondence using energy minimization and mutual information[END_REF][START_REF] Hirschmuller | Accurate and efficient stereo processing by semi-global matching and mutual information[END_REF]. In any case, the matching energy of a pixel p is defined as:

EM (d, p) = ρ(Ir, It • (id + d(p))). (5)
If the similarity measure is defined on a patch, we apply a rigid translation to the patch. Here, we use the ZNCC coefficient as it is robust to changes of illumination and contrast between Ir and It that appear due to specular objects or different acquisition times.

To enforce the regularity of d we choose to penalize the L1-norm of its discretized gradient, modulated by a weight function w. For each edge pq ∈ E:

ER(d, p, q) = w(p, q) d(p) -d(q) 1, (6)
With :

w(p, q) = λ1 + λ2 exp - Ir(p) -Ir(q) 2 σ 2 . (7)
λ1, λ2, and σ are scalar parameters. The L1-norm of the gradient naturally enforces piece-wise constant disparities. The weight function w(p, q) relaxes the regularization on radiometric discontinuities of the reference image as in [START_REF] Gamble | Visual integration and detection of discontinuities: The key role of intensity edges[END_REF]Poggio, 1987, Boykov et al., 2001). This is an effective heuristic as most of the edges of the disparity maps are also edges of the image Ir.

Alternatively, we could use the L1-norm of the laplacian rather than the gradient but this would lead to optimizing second order Conditional Random Fields that despite recent progress in solvers remain intractable in the context of this study [START_REF] Komodakis | Beyond pairwise energies: Efficient optimization for higher-order mrfs[END_REF][START_REF] Ishikawa | Transformation of general binary mrf minimization to the first-order case[END_REF][START_REF] Fix | A graph cut algorithm for higher-order markov random fields[END_REF].

Discrete Conditional Random Fields

We have built the measure EM of how d fits our data and the measure ER of how d respects the a priori knowledge on the disparity map. However, we still need to find the most probable disparity map d * , i.e., the maximum a posteriori, by minimizing Eq. 8 over d ∈ D:

d * = min d∈D E(d). (8)
Finding d * means optimizing a continuous Conditional Random Field (CRF), continuous because d belongs to the continuous space D and conditional because PR depends on the data, i.e., Ir. This task is extremely difficult mainly because d is continuous and non-convex as Fig. 2 illustrates. Instead, we discretize D for each nodes p ∈ V to the discrete set Dp, so that we now deal with a discrete CRF that is much easier to solve, with d living in (Dp)p.

We use the vocabulary of the discrete optimization community and we introduce the notion of graph, unary term, edge cost, distance function, and label set for a CRF.

Our graph is directly the one of the image Ir, i.e., G = (V, E).

We introduce D = p∈V Dp, the union of all tested disparities.

To each disparity of D is associated a label, i.e. an index, in the label space L. Hence, each node p has a different label space Lp ⊂ L that relates to the disparity set Dp.

To each node p ∈ V and each label l ∈ L, we associate a unary term corresponding to Eq. 5:

cp(l) = ρ(Ir, It • (id + D(l))) if l ∈ Lp +∞ otherwise (9)
If l / ∈ Lp the configuration is impossible, and we associate an infinite unary cost.

To each edge pq ∈ E, we associate an edge cost :

wpq = w(p, q). ( 10
)
To each pair of labels (l1, l2) ∈ L we associate a distance function:

δ(l1, l2) = D(l1) -D(l2) 1. ( 11
)
For the sake of completeness, each edge pq ∈ E and each pair of labels (lp, lq) ∈ L defines a pairwise term.

pw(pq, lp, lq) = wpqδ(lp, lq).

We finally optimize the energy of the following discrete CRF:

ECRF = min l∈L p∈V cp(lp) + pq∈E wpqδ(lp, lq). (13)
After optimizing Eq. 13 we obtain a labelling l * that relates to the disparity map d * . For each nodes p ∈ V, the following holds:

d * (p) = D(l * (p)). ( 14
)
We note CRF 1 = [G, c, w, δ] the CRF computed from Ir and It and defined by Eq. 13. CRF 1 belongs to the class of first order CRF because for each edges pq ∈ E, the distance function δ only depends on the two labels lp and lq. The size of CRF 1 depends on: (1) its spatial component, i.e., the number of nodes V and the number of edges E; and ( 2) its label component i.e., the number of label that relates in our case to the number of disparities per node p to evaluate.

The complexity to solve a first order CRF depends on the relative contribution to the energy of the unary terms and the pairwise terms. The higher the contribution of the pairwise terms, the more complex is the CRF optimization. The nature of the distance functions δ is also important. If δ is issued from a metric function, as in our case, then we have mathematical guarantee to retrieve a solution close to the global optimum while optimizing the CRF (Boykov et al., 2001, Komodakis andTziritas, 2007).

During the last decade numerous advances have been achieved to optimize this problem [START_REF] Geman | Stochastic relaxation, gibbs distributions, and the bayesian restoration of images[END_REF][START_REF] Felzenszwalb | Efficient belief propagation for early vision[END_REF][START_REF] Kolmogorov | Convergent tree-reweighted message passing for energy minimization[END_REF][START_REF] Boykov | Fast approximate energy minimization via graph cuts. Pattern Analysis and Machine Intelligence[END_REF], Komodakis et al., 2007a[START_REF] Komodakis | Towards More Efficient and Effective LP-Based Algorithms for MRF Optimization[END_REF]. Our attention was drawn to Fast-PD, [START_REF] Komodakis | Towards More Efficient and Effective LP-Based Algorithms for MRF Optimization[END_REF]Tziritas, 2007, Komodakis et al., 2007b) for two different reasons: (1) it is the fastest algorithm currently available [START_REF] Kappes | A comparative study of modern inference techniques for discrete energy minimization problems[END_REF]; ( 2) it has the ability to use an input as initialization. This last property is extremely interesting as our multi-scale approach benefits from a hot-start of the CRF optimization, using the solution found at a previous scale.

MULTI-SCALE SCHEME AND SPARSE CRF

3.1 The multi-scale scheme

In our remote sensing context images and disparity to recover are large. Directly minimizing Eq. 13 would be inefficient both in terms of memory consumption and computational speed because the needed discretized disparity space D will be very large. Instead, we propose a multi-scale approach to efficiently explore the solution space D with a succession of discretized disparity spaces D.

A multi-scale approach is valid because of the particular structure of the disparity map to retrieve. Indeed, while the full disparity range is large at the image scale, one can notice that locally the range is only a mere fraction of the full range. Natural topography is the main contributor to widening the range of disparities, which has a relatively low spatial frequency at the resolution we work at. Moreover, the local range of disparities is mainly due to manmade objects such as buildings, which tend to have higher spatial frequencies than natural features. Hence, the largest low spatial frequency disparities are resolved at the coarsest scales, while the smallest high spatial frequency disparities are resolved at the finest scales.

Our multiscale approach builds coarse to fine sequences of CRF, CRF n , ..., CRF f , ..., CRF 1 , with CRF 1 being defined at the full resolution of the images Ir and It, and CRF f being defined at a downsampling factor f . Our multiscale approach reduces the size of the CRF on both the spatial and label components. To build CRF f from CRF 1 we can use two different approaches:

(1) image pyramid or (2) energy pyramid. We compare the two approaches in 4.1.

For both pyramid approaches, a crucial step is to define the discretized disparity space We introduce the notion of energy manifold as the hyper-surface formed by the set of unary terms. The energy manifold lives in a 4 dimensional space. One dimension is linked to each spatial component of the unary terms. One dimension is linked to each disparity component of the unary terms.

Image pyramid: the GM-IP algorithm

The Global Matching with Image Pyramid (GM-IP) algorithm is an image pyramid approach based on downsampling the images to reduce both components of CRF 1 . First, we downsample Ir and It to I f r and I f t . This directly reduces the spatial component of the CRF and it smooths the energy manifold, i.e., the label component of CRF. The smoothing allows to reduce the sampling density for (D f p )p, trimming the label component of the CRF. The image pyramid is defined in Algorithm 1.

As the images have been downsampled by a factor f , it is enough to use a 0.5 × f discretization factor for (D f p )p.

At first glance, the downsampling seems to be beneficial as it reduces both components of the CRF. Unfortunately, the smoothing on the label component destroys the energy manifold as illustrated by the Fig. 3. Disparities that should have been retrieved

f init → d f ; if f = 1 then Upsample d f → d; else d f → d;
at coarse scales might be discarded. This generates, especially at coarse scales, artifacts in the retrieved disparity maps d f . Some of these artifacts can be corrected at a finest scale only if they are not too important. This phenomenon is well known of the optical flow community [START_REF] Horn | Determining optical flow[END_REF]. While different heuristics, such as post-processing filtering between scales have been proposed [START_REF] Sun | Secrets of optical flow estimation and their principles[END_REF], none can guarantee to correct these artifacts. This is the main motivation to build a proper representation of the energy manifold through an energy pyramid.

Figure 3: The unary terms (solid line) computed with the image pyramid (k = 8) poorly represent the energy manifold (dashed line).

Enegy pyramid: the GM-EP algorithm

Contrary to the GM-IP algorithm, the Global Matching via Energy Pyramid (GM-EP) algorithm is based on an energy pyramid approach that builds a more faithful representation of the energy as it directly downsamples CRF 1 . Our approach is inspired from the work of [START_REF] Bagon | A multiscale framework for challenging discrete optimization[END_REF]Galun, 2012, Kim et al., 2011). We explain the downsampling procedure in three steps: [START_REF] Fix | A graph cut algorithm for higher-order markov random fields[END_REF] we define how to downsample the graph G of CRF 1 ; (2) we define the coarse edge costs; and (3) given a search space, we define the coarse unary terms.

Downsampling the graph

From a downsampling factor f we define G N odes a function that groups nodes V of G in packets of f × f nodes. These packets define a set of nodes V f . This is illustrated by Fig. 4 as black circled nodes of V are grouped in a 2 × 2 fashion, creating the squared nodes of V f (f=2).

The grouping of nodes separates the edges of E in two different kinds: [START_REF] Fix | A graph cut algorithm for higher-order markov random fields[END_REF] edges that belongs to the same node of V f , i.e., the black thin solid lines in Fig. 4; and ( 2) edges that belongs to two different nodes of V f , i.e., the dashed lines in Fig. 4. We discard the first kind of edges as they only contribute to a constant energy term. We define G Edges as the function that groups the second kind of edges together. G Edges defines the new set of edges E f , i.e., the thick solid lines in Fig. 4.

So far, the grouping procedure defines from

G = [V, E] a graph G f = [V f , E f ]. G f is the spatial support of the donwsampled CRF, CRF f .

Downsampling the edge costs

The grouping procedure also naturally defines the edges costs w f of CRF f as for each edges pq f ∈ E f we have: 2. We apply a morphologic erosion to cp with a square kernel of size k × k. The erosion creates a lower bound value of cp, illustrated by the stars in Fig. 5.

w f pq = pq∈E|G Edges (pq)=pq f
3. We decimate the eroded coefficients with a k sampling step, illustrated by the squares in Fig. 5.

4. Finally, using the spatial grouping function, G N odes , we add all the decimated eroded coefficients to their respected nodes in V f , defining the unary terms c f p f of CRF f .

The different steps of the GM-EP algorithm are summarized in Algorithm 2.

→ G f = [V f , E f ] Apply grouping on edge cost of CRF 1 → w f Compute the unary terms of CRF f → c f p f Solve CRF f with Fast-PD with starting solution d f init → d f ; if f = 1 then Upsample d f → d; else d f → d;
3.4 Using sparsity to reduce the size of CRF Thus far, we have defined two pyramid approaches to reduce both the spatial and label components of Eq. 13 that build a sequence of CRF, [CRF n , ..., CRF f , ..., CRF 1 ]. While we move through the scales, we always center the search space around the revised solution d. Consequently, due to Eq. 9, many unary terms may have an infinite value as illustrated in Fig. 6. Hence, we know beforehand that some configurations of d f are impossible.

To speed up the optimization process we indicate the solver, Fast-PD, not to evaluate the impossible configurations.

A potential approach is to remove all infinite unary terms, reorganize the CRF with respect to the label space and modify the distance function δ to take into account dinit. This leads to a new distance function δ

′ . δ ′ (l p f , l q f ) = (D(p f ) + dinit(p f )) -(D(q f ) + dinit(q f )) 1 (16)
The main drawback is that the new distance function δ ′ is not derived from a metric as it does not respect the triangular inequality. Therefore, we are only mathematically guaranteed to find a local optimum during the optimization (Komodakis et al., 2007a).

Instead, we remove all infinite unary terms but we do not reorganize the CRF and we keep δ as a distance function. This leads Figure 6: The multiscale approach generates sparsity in the CRF sequence, and only the coarsest CRF is assured to be full. The sparsity is due to defining search space around the previous up sampled scale solution dinit to a sparse CRF that keeps the metric properties of the distance function δ. Hence, we are mathematically guaranteed to find a near global optimum to the solution. We design our own implementation of Fast-PD to accept sparse CRF. Modifying Fast-PD for sparse CRF input is beyond this paper's scope, but this will be the subject of a future publication.

EXPERIMENTAL RESULTS

Factory

Urban Figure 7: Image Ir from subsets of a stereo pairs. Each subset is 2500 × 2500 pixels with a GSD of 10 cm.

We use a stereo pair from an aerial survey above an urban environment acquired with (UtraCam, 2014) of 11000 × 20000 pixels. We use our own calibration and aerotriangulation to transform the images into an epipolar geometry limiting the optimization of d to the horizontal direction. We process overlapping tiles of 5000 × 5000 pixels and extract the two subsets presented in Fig. 7 to compare the disparity maps.

Comparing GM-EP and GM-IP algorithms

We compare the GM-EP and GM-IP algorithms by reporting the disparity maps among each scale with the associated final energy and global computation time. For both algorithms we use 4 scales, f ∈ [8, 4, 2, 1], with a search range of [-5 : 0.5 : 5] × f around dinit, and we only perform one iteration per scale. We also define a baseline by solving CRF 0 over a large range of disparities, [-40 : 0.5 : 40]. Note that the baseline can here be computed because we only focus on a small subset of the entire image. The results are presented in Fig. 8.

The black dots that appear in the upper left part of the disparity maps of the image pyramid and the baseline are due to moving vehicles as the stereo pair is issued from quasi-simultaneous acquisitions. Moreover, the direction of motion is very different from the epipolar lines. Our model does not cope with such motion and we do not account for these artifacts in our comparison.

The coarsest scales, f = 8 and f = 4, illustrate how the energy pyramid of the GM-EP algorithm performs a better approximation of the energy manifold than the image pyramid of the GM-IP algorithm. Indeed, the GM-IP disparity maps show smoothed factory edges. However, the same edges appear sharp in the GM-EP results, and even the chimney in top right part of the factory is well defined at the scale f = 4. At the finest scales f = 2 and f = 1 the GM-IP is only able to sharpen some of the blurred edges. For instance, the two tubular elements in the center of the images remain blurred while they appear sharp in GM-EP disparity maps. The visual inspection is confirmed by the energy measurements in Table 1 as the final energy of the GM-EP approach is lower than that of GM-IP. The computation time given in Table 1, is however slightly in favor of GM-IP.

In Fig. 9, we verify how well the GM-EP compares to the baseline. Both results are very close. Nevertheless, little details such as lampposts in the lower left part of image are better represented in the baseline. This is also confirmed in Table 1 as the GM-EP final energy is slightly superior to the baseline energy. However, the computation of the baseline is more than 3 times superior to GM-EP, and this non-pyramidal approach is non-feasible for large images due to exponential memory consumption.

MicMac comparison

We also compare the GM-EP to [START_REF] Micmac | [END_REF], and we only report the final disparity map as the computation time is implementation dependent and the energy is linked to the model, which differs for both algorithms. There are three main differences between the GM-EP and MicMac: (1) the GM-EP model is more complex than the one used in MicMac, i.e., both models seem equivalent if λ2 = 0 in Eq. 7; (2), MicMac uses an image pyramid approach while the GM-EP works on an energy pyramid approach; and, (3) MicMac relies on semi-global optimization while GM-EP uses global optimization that produces near optimum solutions.

On both images, MicMac produces disparity maps with noisy areas that correspond to shadows the in stereo-pair, while the GM-EP is unaffected by shadows. This is due to the difference of models where the weight term of Eq. 7 increases the regularization on constant radiometric areas of the reference image.

Like the GM-IP, MicMac uses an image pyramid that tends to produce blurred edges when dealing with large disparity range. This is illustrated in the top left image of Fig. 10 The GM-EP algorithm obtains a lower energy than GM-IP for a slightly longer processing time. The Baseline obtains the lowest energy with a significant gap compared to GM-IP, but is more than 3 times slower on an Intel Xeon 8 core CPU computer (the code is not optimized). Therefore, the GM-EP algorithm defines good compromise between effective optimization and computation time.

MicMac GM-EP Figure 10: Disparity maps on the Factory and Urban subsets.

CONCLUSIONS AND EXTENSIONS

We proposed a rigorous yet computationally efficient framework for disparity maps estimation using a single stereo pair. This approach naturally lead to a global optimization problem of a CRF. Instead of relying on a semi-global optimization with no mathematical guarantee on the optimality of the solution, we use global discrete optimization which is mathematically guaranteed to yield a near optimum solution. The global optimization is speed-up by building a truthful representation of the energy manifold with an energy pyramid multiscale approach. We also exploited the sparsity of the resulting sequence of CRF to derive the GM-EP algorithm. From a practical standpoint, we demonstrate through experiments on real stereo-pairs the superiority of the GM-EP algorithm over image pyramid approaches whether they rely on global optimization, such as the GM-IP, or semi-global optimization, such as MicMac. Future work will extend the experimental evaluation to standard photogrammetric tools to further assess the performance of our approach. Nevertheless, the comparison with MicMac outlines the importance of the energy modeling for disparity map estimations. Therefore, future work will extend our model to a symmetric definition of the energy with respect to the input images. Indeed, the choice of the reference and the target images from a stereo-pair is completely arbitrary and swapping them produces slightly different disparity maps. We think that a symmetric energy might enhance the quality of estimated disparity maps as the problem is by nature symmetric. We also plan to integrate the notion of occlusions and moving objects in our future model.

Finally, instead of using a multiscale approach, future work will focus on a multigrid scheme to further speed-up the optimization. Indeed, an inherent drawback of multiscale approaches is to force all nodes to work at the same scale, which might not be required as some parts of the disparity map might be well-resolved even at coarse scale.

  . Let It be the target image. Given Ir and It, we need to find the most probable 2D deformation d which associates each pixel of Ir to a pixel of It with d being a function of p ∈ V → d(p) ∈ (R × R). Thus, d lives in

Figure 1 :

 1 Figure 1: Graph G = (V, E) of a 4 by 4 image with a 4 connectivity.

  (Dp)p by adequate sampling of D. The key property lays in noticing that due to the interpolation kernel used for computing It • (id + d(p)), the values of the unary terms are continuous with respect to d(p) and have a limited frequency support. Figure 2 represents typical values of unary terms issued from ZNCC coefficients with a very fine sampling along one component of D. Ideally, we would like to sample D such that the unknown minimum of Eq. 8, d * , is included in the samples. However, we have no prior knowledge of d * . Therefore, we suppose the image well-sampled and we choose to respect the Shanon sampling theorem. As the ZNCC coefficient is defined on a patch, this doubles the frequency support of the unary terms compare to the frequency support of the images Ir and It. Thus, we sample D to half a pixel as in Fig. 2.

Figure 2 :

 2 Figure 2: Illustration of the non convexity of unary terms with a 0.5 pixel discretization step to respect the Shanon sampling theorem.

Figure 4 :

 4 Figure 4: Grouping a set of 4 × 4 nodes into a set of 2 × 2 nodes and implications on the edge set.

  the unary terms and defining the distance function The energy pyramid preserves the energy manifold with respect to the label component. As the unary terms are computed from Ir and It, we should use a half pixel discretization factor for D f . However, this would lead to a large label space at the coarsest scales. Instead, we propose to trim further the label component by creating a lower bound approximation of the energy. Assume that we want each nodes of p f of CRF f to investigate a search space of D f (p f ) = [([dM in : k : dM ax] × [dM in : k : dM ax]) + d f init (p)], with k > 0.5. The unary terms c f p f are computed in four steps illustrated by Fig. 5: 1. We compute an intermediate set of unary terms cp from CRF 1 over the search space D(p) = [(dM in-0.5×k/2 : 0.5 : dM ax + 0.5 × k/2] × [dM in -0.5 × k/2 : 0.5 : dM ax + 0.5 × k/2]) + d(p)]. This is illustrated by the circles of Fig. 5.

Figure 5 :

 5 Figure 5: The erosion produces eroded unary terms, the crosses, that are the lowest of the k = 8 neighbors intermediate unary terms (the circles). The decimation defines the final unary terms (the squares).

Algorithm 2 :

 2 Energy pyramid, GM-EP algorithm Data: Ir,It Result: d Set d = 0 for f = coarsest to finest downsampling factor do Set dinit = d; Downsample dinit by f → d f init ; Define the set of disparity to evaluate from d f init → D f Define the grouping from f → G N odes and G Edges Apply the grouping on G

  by the large chimney, the two tubular objects and the numerous bridges. This also appears on the bell tower in the lower right part of the bottom GM-EP GM-IP Figure 8: Top four rows f = [8, 4, 2, 1], black values represents disparities of -15 pixels or below, and white values represents disparities of 35 pixels or above. Last row absolute difference with respect to the baseline, brighter greys are higher difference. left image of Fig. 10. The edges produces by the GM-EP are sharper and better defined. MicMac suffers from the inherent issues limitations of image pyramid approaches, which are overcome by the GM-EP algorithm. Moreover, as the model of MicMac is less complete than ours, it introduces noisy areas. GM-EP Baseline no pyramid Figure 9: Final disparity maps. Black values represents disparities of -15 pixels or below. White values represents disparities of 35 pixels or above.

Table

ACKNOWLEDGMENTS

The authors are grateful to Nikos Komodakis for his precious help regarding Fast-PD. The authors would like to thanks the anonymous reviewers for helpful comments. This research was supported by the USGS through the Measurements of surface ruptures produced by continental earthquakes from optical imagery and LiDAR project (USGS Award G13AP00037), the Terrestrial Hazard Observation and Reporting Center of Caltech, the Moore foundation through the Advanced Earth Surface Observation Project (AESOP Grant 2808), and the ANR project STEREO.