GEOMETRIC SHAPES

Alexandre Cunha

Center for Advanced Methods in Biological Image Analysis Center for Data Driven Discovery California Institute of Technology, Pasadena, CA, USA

ABSTRACT an efficient linear program in practice. They observed that smooth We present an algorithm to compute the geometric median of shapes do not necessarily lead to smooth , an aspect we also shapes which is based on the extension of median to high dimen- verified in some of our experiments. sions. The median finding problem is formulated as an optimization We propose a method to quickly build median shapes from over distances and it is solved directly using the watershed method closed planar contours representing silhouettes of shapes discretized as an optimizer. We show that the geometric median shape faithfully in images. Our median shape is computed using the notion of represents the true of the data, contaminated or not. geometric median [12], also known as the spatial median, Fermat- It is superior to the mean shape which can be negatively affected by Weber point, and L1 median (see [13] for the history and survey the presence of outliers. Our approach can be applied to manifold of multidimensional medians), which is an extension of the median and non manifold shapes, with single or multiple connected com- of numbers to points in higher dimensional spaces. The geometric ponents. The application of distance transform and watershed algo- median has the property, in any dimension, that it minimizes the n rithm, two well established constructs of image processing, lead to sum of its Euclidean distances to given anchor points xj ∈ R ,

an algorithm that can be quickly implemented to generate fast solu- ∗ X x = arg min kx − xj k . (1) tions with linear storage requirement. We demonstrate our methods x in synthetic and natural shapes and compare median and mean re- j sults under increasing outlier contamination. It has a breakdown point of 0.5, i.e. the data can be corrupted with up Index Terms— Shape Analysis, Geometric Median, Median to 50% and it still gives a good prediction representing the sample Shape, Average Shape, Segmentation Fusion [14] (and [15] for the functional median). Unlike the mean () of points, which can be found directly using a analytical expression, 1. INTRODUCTION the geometric median can only be approximated by numerical algo- rithms. Due to convexity of eq.(1) the median point always exist and The computation of an average shape from a collection of similar it is unique provided the anchor points are not collinear [16]. The ge- shapes is an important tool when classifying, comparing, and search- ometric median lies within the convex hull of the given points (see ing for objects in a database or in an image. It is helpful, for example, e.g. [17]), a property we will exploit in our approach. when morphology is key in the identification of healthy and diseased Researchers have developed fast numerical solutions for this cells, when differentiating wild from mutated cells, in the construc- convex problem. Weiszfeld developed in 1937, at the age of 16 tion of anatomical atlases, and when combining different candidate years old, a gradient descent algorithm which is still quite com- segmentations for the same image. The average usually takes the petitive (see translated reprint [18], and [19] for a review). It was form of the mean or the median, the latter being preferred due to rediscovered many times until recognition on early 60’s. New de- its robustness to automatically filter out outliers. Shape analysis is velopments claim faster algorithms that can handle large data sets a vast field of research and many solutions have been proposed to [20, 21]. We do not rely on these methods as our median shape is determine geometrical and statistical mean shapes (see e.g. [1, 2]), generated by finding paths of minimum cost in the discrete image with applications ranging from cell biology to space exploration and domain. arXiv:1810.12445v3 [cs.CV] 15 Apr 2019 methods in the fields of elastic shape analysis [3, 4] and most re- The emphasis of our presentation is to introduce a novel al- cently in deep learning for shape analysis [5, 6, 7]. gorithm capable of generating median shapes in a fast manner us- Comparatively, very few have proposed methods for computing ing tools already familiar to the image processing community. We medians of shapes. Fletcher et al. [8] developed a method to com- will leave proofs for the mathematical models and formulations pre- pute the geometric median on Riemannian shape manifolds showing sented here for future work. robustness to outliers on the Kendall shape space. In [9] the authors formulate the median finding problem as a variational problem tak- 2. METHODS ing into account the area of the symmetric difference of shapes, a model investigated much earlier in [10]. More recently, the work in 2.1. A distance for planar shapes [11] represents shapes as integral currents and consider median find- ing using a variational formulation which the authors claim lead to We define here the expression to measure the distance between closed planar shapes represented by their contours. It is this metric Funding supporting this work was provided by the Beckman Insti- that we will be optimizing when computing the geometric median tute at Caltech, a research center endowed with funds from the Arnold and Mabel Beckman Foundation, to the Center for Advanced Methods of a set of shapes. We assume contours are rectifiable curves, but in Biological Image Analsysis. Correspondence should be addressed to do not restrict their topology to planar manifolds, crossings are al- [email protected]. lowed. Other popular metrics to measure distances between shapes, 2.2. Geometric median for shapes We formulate the problem of finding the geometric median of shapes as an optimization problem over distances, similar to the high dimen- sional geometric median of points: find the optimal closed contour Γ∗ that minimizes the sum of distances to a given set of closed con- n tours {Γi}i=1, n ∗ X Γ = arg min d(Γ, Γi) (5) Γ i=1 Fig. 1: Illustration of planar shape distances. Arrows in the left figure where d(·, ·) is given by eq.(3) and the solution lies in the convex represent the shortest distances dΓ (x) and dΨ(y) from points x ∈ Ψ and ∗ y ∈ Γ, respectively, to closed contours Γ and Ψ. The figure on the right hull of {Γi}, Γ ⊂ ch({Γi}). When each curve Γi degenerates to illustrates a case where the horizontal black curve Γ is equally distant to a point, with |Γi| = 1, then the problem is reduced to finding the three different other curves, d(Γ, Γ1) = d(Γ, Γ2) = d(Γ, Γ3) = 63. The geometric median of points. From eq.(5) we then have symmetric distance d captures our two-way expectations: d (Γ, Γ ) = g g 1 n  Z  145 > dg(Γ, Γ2) = 129 > dg(Γ, Γ3) = 116. Curves Γi only differ at ∗ X 1 Γ = arg min dΓi (x)ds , x ∈ Γ the bulgy part. Slanted arrows on the right figure are directed to the farthest Γ |Γ| i=1 Γ points on Γi from Γ. To compute dg, curves were 8-connected discretized in n ! 429x295 images. 1 Z X = arg min dΓi (x) ds (6) Γ |Γ| e.g. Hausdorff and Frechet´ distances, are not suitable for our median Γ i=1 formulation as they do not report distances along the entire length of n ! 1 Z X candidate curves. = arg min kx − yik ds, yi ∈ Γi 2 2 Γ |Γ| Γ Let dΓ : R → R give the distance of a point x ∈ R to a curve i=1 Γ ⊂ R2, where R and P commute due to Tonelli’s theorem for non-negative dΓ (x) = inf kx − yk > 0 (2) y∈Γ functions [22] (indeed, dΓi (·) > 0) and yi is the point in Γi closest to x ∈ Γ, as in Fig.1. It should be clear that the location of each y where the infimum is attained for one or more points y ∈ Γ closest i depends on the position of x in Γ, thus y := y (x). to x, and the L norm k · k gives the between i 2 Let’s for a moment ignore |Γ| on eq.(6) and consider an approx- points (see Fig.1). Note that d (x) = 0 ⇐⇒ x ∈ Γ. We then define Γ imation of the unknown Γ by an ordered set of points (x , . . . , x ). the distance from a rectifiable curve Γ to another curve Ψ using a 1 m At the solution Γ∗ := (x∗, . . . , x∗ ), the term in parentheses on the integral over all points x := x(s) ∈ Γ, 1 m last expression in eq.(6) is optimized for each xj which implies that ∗ n 1 Z any point in Γ is in fact the geometric median of points {yi}i=1, d(Γ, Ψ) = dΨ (x)ds (3) each from a single Γi, |Γ| Γ n ∗ X ∗ ∗ x = arg min kx − yik, yi ∈ Γi, ∀x ∈ Γ (7) where dΨ (·) is given by eq(2), ds is the arc length differential, and x |Γ| > 0 is the length of curve Γ. By integrating distances for all i=1 ∗ points along the curve and dividing by its length we have a measure Since we know x ∈ ch({yi}) ⊂ ch({Γi}), see e.g. [17], we can ∗ that tells us how far, in average, is the source curve Γ to the target then show by contradiction that Γ ⊂ ch({Γi}), as stated above. curve Ψ. This measure is independent of curve parameterization. This is a property that will help us in the optimization. Directly ∗ It follows that d(Γ, Ψ) > 0 and d(Γ, Ψ) = 0 ⇐⇒ Γ = Ψ. If computing each x from points yi(x) is not straightforward due to Γ and Ψ are parallel curves for which ∀x ∈ Γ, dΨ (x) = δ, then the nonlinear dependency of yi on x. It is also not clear how to d(Γ, Ψ) = δ, which is what we intuitively expect. As an example, properly select a set of n points {yi}, one for each curve Γi, to for two concentric circles with radii r > r , we have δ = r − r . ∗ ∗ 1 2 1 2 produce each median point xj in Γ . Another property of d(·, ·) is its invariance under isometries (rigid By discarding the contribution of the curve length |Γ| and opti- transformations including reflections), owing to the intrinsic prop- mizing solely based on distances, i.e. minimizing the following func- erty of curve length and to the preservation of point distances under tional n ! such transformations. Z X In general, this distance is asymmetric, d(Γ, Ψ) 6= d(Ψ, Γ), J(Γ) = kx − yi(x)k ds, x ∈ Γ (8) unless the curves themselves are symmetric with respect to an axis. Γ i=1 Similar to the Hausdorff distance, we combine d(Γ, Ψ) and d(Ψ, Γ) we end up with a simpler problem while, surprisingly, still solving to obtain a symmetric distance dg, the original optimization problem in eq.(5). Our results consistently demonstrate we are also optimizing for the curve length even though 1 we are not explicitly considering it in the optimization. d (Γ, Ψ) = (d(Γ, Ψ) + d(Ψ, Γ)) (4) g 2 When we use a squared norm in eq.(8) and elsewhere, i.e. 2 ∗ squared distances kx−yik instead of kx−yik, then we call Γ the possessing the following properties: (1) dg(Γ, Ψ) > 0 (non–nega- optimal mean shape. We compare mean and median shapes in our tivity); (2) dg(Γ, Ψ) = 0 ⇐⇒ Γ = Ψ (identity); (3) dg(Γ, Ψ) = experiments and show the latter is much less sensitive to outliers. dg(Ψ, Γ) (symmetry); (4) dg(Γ, Ψ) 6 dg(Γ, Φ)+dg(Φ, Ψ), ∀Γ, Ψ, Φ (triangle inequality). Properties (1) to (3) are due to the Eu- 2.3. Optimization with watershed transform clidean norm used in d(·, ·). The triangle inequality property re- quires formal proof, a task for future work. All properties have been We look for the closed contour having overall the smallest sum of experimentally validated. distances from its points to all given contours Γi. We solve this problem as an optimal path finding problem where the watershed in Fig.4, even after taking h = 1, as they are very dissimilar to each with markers method [23] is applied over the accumulated distance other and dispersed. transforms image of the given curves to generate the median contour When contours reach the boundaries of the image, GEMS results ∗ Γ . Briefly, the basic idea to form the median is as follows. For need to be augmented. This is, for example, the case when build- every grid point x in the image domain we find its total distance ing a consensus out of many binary contour segmentations {Γi} for φ(x) to all the contours Γi – this is what the accumulated distance tiles of an image – see Fig.5. Disconnected basins are formed at the transform does. The next step is to find those grid points forming boundary of the image φˆ and we no longer have the larger marker a closed path which together have the least sum of total distances, ∗ ∗ outside the convex hull to eliminate them. This in turn leads to the φ(Γ ) < φ(Γ), ∀Γ 6= Γ . This is accomplished by the watershed creation of extra regions not representing the actual data. We re- method which computes the closed path with minimum cost. pair this over segmentation, whenever present, by removing edges Others have applied the watershed method to solve optimization ∗ S from Γ according to the following criteria: (1) Let Γor = i Γi. ∗ problems on either a graph or a discrete grid. For example, Cuprie Edges in Γ not present in Γor are removed: if the edge has no et al. [24] used the Power Watershed [25] in their formulation of candidate from the pool of segmentations, there is no justification to the surface reconstruction from point cloud problem to minimize a keep it; this eliminates the great majority of extraneous edges in Γ∗. weighted total variation functional where weights are proportional (2) Edges in Γ∗ which have a small count (currently 20%) in the to Euclidean distances between points. pool {Γi} and an average intensity close to background are elimi- We abuse the notation here and use Γi to designate both the 8- nated; this is done to remove edges introduced only by a few users connected contour and the image containing it. We represent each that can be potentially annotation mistakes. contour Γi as the zero level set of a unsigned distance transform Our experiments have consistently demonstrated that the median function φi :Ω → R+, such that φi(x) = 0 for x ∈ Γi, φi(x) > 0 ∗ P shapes Γ obtained using GEMS have a cost i d(Γ, Γi) lower than for x ∈ Ω \ Γi, and φi(x) gives the shortest distance from x to any other contour in its vicinity, Γ = Γ∗ + Ψ,   1, and else- curve Γi. Thus, from eq.(2), φi(x) = dΓi (x). If we take the sum where. One might argue that the cost could be reduced, according to Pn φ(x) = i=1 φi(x) for every point x in the domain Ω of the image, ∗ eq.(3), by picking a longer curve. But this is not the case. Choos- the median contour Γ is a minimal path in the image φ. ing a contour Γ longer than Γ∗, a few pixels away from the optimal To create markers for the watershed, we take the union of the configuration, increases the sum of distances φ at a greater rate, as ˆ basins in φ (the inverted φ) with the complement of the convex the accumulated point distances φ(Γ) grows faster than the curve hull of contours Γi, Ω \ ch({Γi}). The marker imposed out- length |Γ|. Conversely, choosing a curve with fewer points to de- side the convex hull prevents the creation of false positive regions crease φ(Γ) does not reduce the cost J(Γ) as now the curve length due to eventual basins placed close to the boundary of the image. is smaller and although we have now fewer points each has a higher Points in regional minima are those farthest from the contours, and accumulated distance. Evidences suggest then that GEMS not only hence serve well as markers. The watershed lines computed from finds the contour with lowest accumulated L1 distances, J(Γ), but it ∗ these markers form Γ , as presented in the GEMS algorithm below. also picks the path with the right length. This indicates that Γ∗ op- timizes distances d(·, ·), and consequently dg(·, ·). We report values GEMS – Geometric Median Shapes for dg in our experiments.

1: procedure GEMS(h, Γ1,..., Γn) 2: Input: h (minima height), Γi (contour images) 3: Output: Γ∗ (geometric median) 4: φ = 0 5: for i = 1, . . . , n do 0 6: φ = EuclideanDistanceTransform(Γi) 7: φ = φ + φ0 8: end 9: φˆ = invert(φ) 10: B = WatershedBasins(φ,ˆ h) 11: H = ConvexHull(Γ1,..., Γn) 12: markers = B ∪ {Ω \ H} 13: Γ∗ = Watershed(φ,ˆ markers)

Our current implementation of GEMS is a script that uses distance trans- Fig. 2: Median and mean shapes for Ginkgo biloba leaves. Sixteen leaf forms, height minima, minima, convex hull, and watershed implementations curves are ordered according to their d distances to their geometric median. pink gmic g from the [26] and [27] packages, with image I/O operations pri- They were midvein aligned and scaled keeping their original aspect ratio and gmic marily supported by . Note that memory space is linear in image size shape, all shown on the curves panel. Their respective geometric median Γ and does not grow with the number of contours i. The only parameter that and mean shapes are the black curves on the medians and means panels. h needs adjustments is the height used for the detection of watershed basins. Median and mean are 2.63 pixel units d distant. Note that the petiole (lower for g The loop can be parallelized to speed up computations. tip) is better captured by the median. The gray mean shapes were obtained after tainting data with two (black and brown curves) and five outliers, shown When the contours Γi are highly dissimilar in shape and location on the rightmost outliers panel, resulting in poor average shapes distant then a shape representing the central tendency of the data is either 24.11 and 56.75 from the true mean. We can no longer obtain a simple mean too weak or non existent. This is reflected in the value of the height curve when these five outliers are considered. These outliers barely affect the ∗ median. The gray median, shown on the medians panel, is only 10.38 parameter h: the smaller the h value needed to create Γ , the less pixel units apart from the true median. It was obtained after contaminating cohesive is the data – provided colocalized shapes are not too slim. data with ten outliers, twice as much used for the mean, thus illustrating the For example, we could not obtain a median for the colored outliers superiority of the geometric median. Leaf images have 800x800 pixels. 3. EXPERIMENTAL RESULTS

We demonstrate GEMS on a set of planar shapes ranging from plant leaves to hand traced circles and non-manifold shapes resulting from interactive segmentation of biological cells. The examples in the figures are self contained and address particular cases of interest. Leaf data is from [28]. In the Ginkgo biloba leaves experiment, Fig.2, we compute me- dian and mean shapes for sixteen aligned contours, with and without #outliers 2 4 6 8 10 12 14 median 0.52 0.88 1.15 1.48 1.88 2.47 3.04 outliers. Median and mean are initially pretty close, dg = 2.63, mean 9.91 20.47 27.72 35.13 40.01 43.70 47.69 but their distances increase with the introduction of outliers. The in- Fig. 4: Robustness to outliers. Thirteen noisy circles hand traced by fluence of data alignment for the median computation is presented different users, shown on top row, were collected using our Collaborative in Fig.3, where tulip leaves are registered in different ways leading Segmentation web application. We progressively added randomly generated to distinct but close in shape medians. We illustrate in the circles outliers to contaminate the circle data with up to fourteen outliers, 50%+1 example, Fig.4, a case that the geometric median holds the central contamination (colored rubber bands on outliers panel, one color per tendency even when the contamination with outliers is beyond 50%. outlier, some disconnected). These are strong outliers as they greatly differ This is not the case for the mean shape which deteriorates quickly in size, shape, topology, and location when compared to the circles – see circles+outliers as we increase the number of random outliers tainting the data. In panel. For each additional outlier added to the pool of circles, we compute new median and mean shapes and then measure their the last experiment, Fig.5, we use the augmented GEMS described distance dg to, respectively, the median and mean shapes obtained without in section 2.3, to create a consensus segmentation for a small set of outliers. These numbers are shown on the table above for seven out of interactively generated segmentation results. These segmentations fourteen contaminations. The geometric median is marginally affected – dg are for small tiles cropped from large cell images. We compare our is at most 3 pixel units – while the mean significantly deteriorates, early and results with those created by the Staple method [29] and show that quickly. Panels medians and means show respectively geometric median our approach is comparable, and sometimes better, and can produce and mean shapes as outliers progress, from one to fourteen. All processed images have 400x400 pixels. results much faster. As part of future work, we intend to extend the model and ex- 4. CONCLUSIONS periments to 3D. We also plan to investigate using distances other than the Euclidean distance which might lead to other types of av- We presented an algorithm, GEMS, to compute geometric median erage shapes. We also plan to adopt weights to combine shapes, in shapes which is simple, fast, straightforward to implement and re- a weighted average fashion, as this might be useful in shape cluster- quires adjustments of a single parameter. The approach leads to me- ing problems. We intend to investigate if and how the distance d dian shapes that are robust to outliers supporting a contamination of g and our median shapes can improve classification in large data sets. over 50% while still capturing the central tendency of given shapes. We are also interested in continuing studying the potential of medi- We adopted the watershed transform as the optimizer to identify ans for the segmentation consensus problem in both 2D and 3D, as paths of minimal cost in the accumulated distance transform image. the need to combine individual segmentations while automatically Our experiments have shown that the proposed symmetric distance discarding outliers is of importance to real time collaborative seg- d is optimized for the geometric median contour even though the g mentation systems. curve length is not explicitly considered in the optimization. From our initial experimentation, our approach compares well with the Staple method in the segmentation consensus problem while being faster by many orders of magnitude.

Fig. 5: Segmentation consensus. Results of interactive segmentation (columns 2 to 6) are shown for four small tiles (column 1) of much larger images. Although users create different segmentations for the same image, they nevertheless exhibit some agreement most prominent in clear, Fig. 3: Alignment and medians. Sixteen tulip tree (Liriodendron tulip- unambiguous parts of the image. Using our median approach to combine ifera) leaves, shown on the left panel, are aligned in different ways leading users’ segmentations into a single one eliminates outliers and spurious to different median shapes (bottom right curves) conforming to the align- annotations, e.g. dangling scribbles and speckles, as shown in our results ment. We overlay the medians, shown as thick red contours, onto the aligned on the last column, 8. Our solution is on par or better (third row) than leaf curves to visually demonstrate their placement: in the convex hull of results obtained with the Staple method [29], shown on column 7, and the given shapes and not biased towards the extremes – see e.g. the top right orders of magnitude faster (e.g. 1.06s against 237.35s for sixteen 800x800 case. Registrations were: no registration (top,left), registration to a line pass- images) when compared to the expectation maximization approach adopted ing through side lobe corners (top right), and rigid registration, all done using by Staple. Users’ segmentations are from our Collaborative Segmentation the same chosen target image from from the pool. web application. h = 5 or 10. 5. REFERENCES [16] J. H. B. Kemperman, “The median of a finite measure on a Banach space,” Statistical Data Analysis Based on the L1- [1] Eric Klassen, Anuj Srivastava, M Mio, and Shantanu H Joshi, norm and Related Methods (Neuchatel,ˆ 1987), pp. 217–230, “Analysis of planar shapes using geodesic paths on shape 1987. IEEE Transactions on Pattern Analysis and Machine spaces,” [17] Stanislav Minsker, “Geometric median and robust estimation Intelligence , vol. 26, no. 3, pp. 372–383, 2004. in Banach spaces,” Bernoulli, vol. 21, no. 4, pp. 2308–2335, [2] Luciano da Fona Costa and Roberto Marcond Cesar Jr, Shape 2015. classification and analysis: theory and practice, CRC Press, [18] Endre Weiszfeld and Frank Plastria, “On the point for which 2018. the sum of the distances to n given points is minimum,” Annals [3] Washington Mio, Anuj Srivastava, and Shantanu Joshi, “On of Operations Research, vol. 167, no. 1, pp. 7–41, 2009. shape of plane elastic curves,” International Journal of Com- [19] Amir Beck and Shoham Sabach, “Weiszfeld’s method: old puter Vision, vol. 73, no. 3, pp. 307–324, 2007. and new results,” Journal of Optimization Theory and Appli- [4] Anuj Srivastava, Eric Klassen, Shantanu H Joshi, and Ian H cations, vol. 164, no. 1, pp. 1–40, 2015.

Jermyn, “Shape analysis of elastic curves in Euclidean spaces,” [20] Yehuda Vardi and Cun-Hui Zhang, “The multivariate L1- IEEE Transactions on Pattern Analysis and Machine Intelli- median and associated data depth,” Proceedings of the Na- gence, vol. 33, no. 7, pp. 1415–1428, 2011. tional Academy of Sciences, vol. 97, no. 4, pp. 1423–1426, [5] Davide Boscaini, Jonathan Masci, Emanuele Rodola,` and 2000. Michael Bronstein, “Learning shape correspondence with [21] Herve´ Cardot, Peggy Cenac,´ and Pierre-Andre´ Zitt, “Efficient anisotropic convolutional neural networks,” in Advances in and fast estimation of the geometric median in Hilbert spaces Neural Information Processing Systems, 2016, pp. 3189–3197. with an averaged stochastic gradient algorithm,” Bernoulli, vol. [6] Matthias Vestner, Zorah Lahner,¨ Amit Boyarski, Or Litany, 19, no. 1, pp. 18–43, 2013. Ron Slossberg, Tal Remez, Emanuele Rodola, Alex Bron- [22] Gerald B Folland, Real analysis: modern techniques and their stein, Michael Bronstein, and Ron Kimmel, “Efficient de- applications, John Wiley & Sons, 2013. 3D formable shape correspondence via kernel matching,” in [23] Serge Beucher and Fernand Meyer, “The morphological ap- Vision (3DV), 2017 International Conference on . IEEE, 2017, proach to segmentation: the watershed transformation,” Opti- pp. 517–526. cal Engineering-New York-Marcel Dekker Incorporated-, vol. [7] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C 34, pp. 433–433, 1992. Russell, and Mathieu Aubry, “3D-CODED: 3D correspon- [24] Camille Couprie, Xavier Bresson, Laurent Najman, Hugues dences by deep deformation,” in Proceedings of the European Talbot, and Leo Grady, “Surface reconstruction using power Conference on Computer Vision (ECCV), 2018, pp. 230–246. watershed,” in International Symposium on Mathematical [8] P Thomas Fletcher, Suresh Venkatasubramanian, and Sarang Morphology and Its Applications to Signal and Image Process- Joshi, “ on Riemannian manifolds via the geo- ing. Springer, 2011, pp. 381–392. metric median,” in Computer Vision and Pattern Recognition, [25] Camille Couprie, Leo Grady, Laurent Najman, and Hugues 2008. CVPR 2008. IEEE, 2008, pp. 1–8. Talbot, “Power watershed: a unifying graph-based optimiza- [9] Benjamin Berkels, Gina Linkmann, and Martin Rumpf, “An tion framework,” IEEE Transactions on Pattern Analysis and SL (2) invariant shape median,” Journal of Mathematical Machine Intelligence, vol. 33, no. 7, pp. 1384–1399, 2011. Imaging and Vision, vol. 37, no. 2, pp. 85–97, 2010. [26] Michel Couprie, Laszlo Marak, and Hugues Talbot, “The Pink [10] Alexandre Cunha, A fully eulerian method for shape optimiza- Image Processing Library,” https://perso.esiee.fr/ tion, with application to Navier-Stokes flows, chapter 2: Shape ˜coupriem/Pink/doc/html/. Matching, pp. 9–43, PhD thesis, Carnegie Mellon University, [27] David Tschumperle,´ “G’MIC, GREYC’s Magic for Image September 2004. Computing,” https://gmic.eu. [11] Yunfeng Hu, Matthew Hudelson, Bala Krishnamoorthy, Al- [28] Charles Mallah, James Cope, and James Orwell, “Plant leaf tansuren Tumurbaatar, and Kevin R Vixie, “Median shapes,” classification using probabilistic integration of shape, texture arXiv preprint arXiv:1802.04968, 2018. and margin features,” Signal Processing, Pattern Recognition and Applications [12] JBS Haldane, “Note on the median of a multivariate distribu- , vol. 5, no. 1, 2013. tion,” Biometrika, vol. 35, no. 3-4, pp. 414–417, 1948. [29] Simon K Warfield, Kelly H Zou, and William M Wells, “Si- multaneous truth and performance level estimation (STAPLE): [13] Christopher G Small, “A survey of multidimensional medi- an algorithm for the validation of image segmentation,” IEEE ans,” International Statistical Review/Revue Internationale de Transactions on Medical Imaging, vol. 23, no. 7, pp. 903–921, Statistique, pp. 263–277, 1990. 2004. [14] Hendrik P Lopuhaa¨ and Peter J Rousseeuw, “Breakdown points of affine equivariant estimators of multivariate location and covariance matrices,” The Annals of Statistics, vol. 19, no. 1, pp. 229–248, 1991. [15] Daniel Gervini, “Robust functional estimation using the me- dian and spherical principal components,” Biometrika, vol. 95, no. 3, pp. 587–600, 2008.