Elsevier

Computers & Graphics

Volume 36, Issue 6, October 2012, Pages 642-650
Computers & Graphics

Technical Section
Euler arc splines for curve completion

https://doi.org/10.1016/j.cag.2012.04.001Get rights and content

Abstract

This paper introduces a special arc spline called an Euler arc spline as the basic form for visually pleasing completion curves. It is considered as an extension of an Euler curve in the sense that the points in the Euler curve are replaced by arcs. A simple way for specifying it, which is suitable for shape completion, is presented. It is shown that Euler arc splines have several properties desired by aesthetics of curves, in addition to computational simplicity and NURBS representation. An algorithm is proposed for curve completion using Euler arc splines. The development of the algorithm involves two optimization processes, which are converted into a single minimization problem in two variables solved by the Levenberg–Marquardt algorithm. Compared to previous methods, the proposed algorithm always guarantees the interpolation of two boundary conditions.

Graphical abstract

An Euler arc spline curve and its associate construction algorithm are introduced for completing contour beyond an occluson. This has applications in graphics and vision such as image inpainting for proper filling-in and avoiding unnecessary diffusion.

  1. Download : Download high-res image (181KB)
  2. Download : Download full-size image

Highlights

► Euler arc splines are introduced for curve completion. ► Euler arc splines are shown to have properties desired by aesthetics of curves. ► A curve completion algorithm guarantees the interpolation of boundary conditions.

Introduction

This paper deals with the problem of curve completion, which is a process of completing contours beyond occlusions or across gaps [1]. It is also known as shape completion or gap completion, which is related to visual completion—a fundamental skill for human vision system [2]. Referring to Fig. 1, for example, when an object is partially occluded by others, human can automatically fill the gap by completing its contour; when an object is illusory, human can also consciously generate a subjective completed boundary. However, for a computer, this is a nontrivial task. Shape completion has wide applications in computer graphics such as shape transition or repairing for CAD [3], [4] and in computer vision such as inpainting for objects with smooth curvilinear shapes [1].

The process of shape completion is actually to find an optimal curve through two specified endpoints with associated orientations, which we call point-orientation pairs. There exist many possible curves that meet the conditions of point-orientation pairs. The problem is under-specified despite the appeal of our vision intuition for an optimal solution [1]. The solution really depends on the criteria regarding what constitutes the most “likely” or the most “pleasing” curve [1], [5]. In this paper we provide a new solution by presenting an appropriate curve representation and its associated construction algorithm.

Since two given points with associated orientations provide the first order geometric Hermite data, a straightforward approach to shape completion is to use cubic Hermite interpolation [4]. Hermite interpolation is simple to construct and compute, but it does not always provide satisfactory results as shown in [3]. It is pointed out in [6] that one reason for Hermite interpolation to produce undesired shapes is unsuitable magnitudes of the given tangent vectors. Therefore Yong and Cheng present a new class of curves called optimized geometric Hermite curves for which the magnitudes of the endpoint tangent vectors in the Hermite interpolation process are optimized to make the strain energy of the curves be minimized [6].

Ullman suggests several criteria for completion curves [7]. That is, the curves should be invariant to rigid transformation, at least differentiable once, extensible, and minimize total curvature. Based on these criteria, he then proposes to use biarcs that minimize total square curvature as completion curves. However, it is later found that in many cases biarc completions have less pleasing appearance than the cubic polynomial completions [8] and Ullman's biarc completion curve is generally not extensible [9]. Knuth considers the shape representation and construction of letters or symbols in typography from a collection of points [10], which is a problem similar to shape completion. He proposes six criteria, somewhat similar to Ullman's, which the most “pleasing” curve through a set of specified points should satisfy. These criteria are known as similar transformation invariance, symmetry, extensibility, locality, smoothness, and roundedness [10], [1]. Since the last four criteria cannot be simultaneously satisfied, Knuth gives up the extensibility and roundedness properties but insists in the locality property, which leads to a cubic spline interpolation solution. This is the base of Knuth's METAFONT system. However, psychological studies have indicated that splines may not be a satisfactory primitive for shape completion [11].

A lot of work on aesthetic curve design proposes some energy functional and defines the curve as a solution to the problem of minimizing the energy functional. Elastica is one of such examples, in which the energy functional is the integral of a linear combination of the square curvature and the arc-length [12], [13], [14], [15]. Elastica is extensible, but not scale-invariant or rounded. On the other hand, it is argued that the energy functional capturing the elusive nature of the “most pleasing” curve should penalize curvature variation, but not necessarily curvature proper as in Elastica. In particular, minimizing the integral of the square of the derivative of curvature with respect to arc-length requires the curvature to be linear in arc-length, which leads to an Euler curve. Euler curves are also known as “Cornu spirals” or “Clothoid”. They have been used in various applications including highway and railroad design, computer aided design, and computer arts. 2D Euler curves have been generalized to 3D such that the curvature and torsion of the curve are linear with arc-length [16], [3] or to piecewise Euler spirals [17]. Since Euler curves are defined by complicated transcendental functions, some work devotes to approximating Euler curves by some simple representations such as Bézier curves and arc splines [18], [19], [20], [21], [22].

Kimia et al. [1] show that Euler curves are a suitable primitive for shape completion and various practical advantages of using Euler curve interpolation are examined. An algorithm for shape completion using Euler curves is described, which finds the completion curve by solving two nonlinear equations in two unknowns involving Fresnel integrals. A biarc fitting is used for producing an initial guess and then the algorithm performs iteratively. Walton and Meek [23] improve the work by formulating the problem into two nonlinear equations with only one unknown each, which gives a faster and more accurate algorithm.

This paper is inspired by Kimia et al.'s work of using Euler curves for shape completion [1]. Psychological studies show that Euler curves have good fit to the way that the human eyes complete curves [11]. However, there are some drawbacks with Euler curves for shape completion. First, due to complicated transcendental function representation of Euler curves, it is difficult or expensive to compute with Euler curves. In particular, for rendering purpose, Euler curves are often approximated by line segments or arc segments. Second, Kimia et al.'s algorithm finds the solution by a numerical approach that minimizes the distance between the second given point and the last point of the Euler curve. Sometimes the numerical approach might not converge or the approximate solution is not good enough. As a consequence, the resulting Euler curve will not pass through the second point. This will violate the aesthetics of shape completion since human perception is sensitive to gaps. Third, Euler curves are not compatible with nonuniform rational B-splines (NURBS) which are an industry standard in CAD/CAM.

These limitations motivate us to explore new completion curve models and shape completion algorithms. It is observed by Horn [12] that in the optimal multi-arcs that approximate the “smoothest” curve arcs tend to be of equal length and curvature changes more or less linearly along the curve. Therefore in this paper, we propose a special arc spline called an Euler arc spline as the completion curve primitive for shape completion. The Euler arc spline consists of G1 continuous arcs of the same length with curvature changing linearly from one arc to another. It is a good approximation to an Euler curve. We identify and analyze the parameters needed to specify an Euler arc spline in Section 2 and show that Euler arc spline curves exhibit similar properties as Euler curves. Meanwhile, Euler arc spline curves are simple for computation, rendering and other geometric processing such as offsetting and distance query. They are nonuniform rational B-spline curves, facilitating the use with standard graphics packages. Another arc spline similar to an Euler arc spline has been introduced in [21], which is called discrete clothoid where the first and last arcs are half the length of the others. The approximation properties of discrete clothoid are analyzed. Particularly, if a clothoid is approximated by a discrete clothoid of n arcs, the approximation error is of order O(1/n2). However, no algorithm is provided to construct a discrete clothoid for shape completion.

We also propose a curve completion algorithm using the proposed Euler arc splines in Section 3. We reduce the construction of completion curve from two point-orientation pairs to minimizing the sum of squares of nonlinear functions in two unknowns, which is then solved by the Levenberg–Marquardt algorithm. The underlying idea of our approach is to distribute the approximate error between the second given point and the last point of the completion curve to all the arcs and an optimization procedure is performed to minimize the errors. Consequently, the interpolation of two given point-orientation pairs with our completion curve is always guaranteed, which overcomes the drawback of Kimia et al.'s algorithm.

Section snippets

Arc splines and Euler arc splines

This section first examines the representation of a G1 continuous arc spline, then introduces Euler arc splines, and identifies parameters needed for the construction of an Euler arc spline in a way that is suitable for shape completion. Some properties of Euler arc splines are also analyzed.

Curve completion algorithm

This section presents an algorithm that attempts to construct an EAS curve to interpolate two given point-orientation pairs for shape completion. The problem of curve completion using an EAS can be stated as follows: Given two points PA=(xA,yA) and PB=(xB,yB) with orientations θA and θB, find an EAS curve consisting of n arcs that interpolates them, which is illustrated in Fig. 6.

As discussed in Section 2.2, an Euler arc curve can be defined by P0,θ0,n, s, α and κ1. For our problem, we obtain

Experimental results

This section provides experimental results to validate the algorithm. We have implemented our algorithm using C++. The test was conducted on HP xw6600 Workstation with 2.00 GHz CPU and 3.00 GB of RAM. The testing results show that the proposed algorithm is fast enough for realtime applications. The running time for all the examples given in this section is less than 0.02 s using the proposed algorithm. The rest of the section then reports the performance of the proposed algorithm in other aspects.

Conclusion

We have described a new solution to curve completion. The main contribution of the paper is twofold. First, we introduce Euler arc splines as a new completion curve representation. Euler arc spline curves can be considered as an extension of Euler curves. Similar to Euler curves, Euler arc splines have several nice properties desired by the aesthetics of curves and meanwhile they can be represented by NURBS curves, making them easier to use in conjunction with existing commercial software

Acknowledgments

This work is supported by ARC 9/09 Grant (MOE2008-T2-1-075) from Singapore.

References (26)

  • M. Nitzberg et al.

    Filetring, segmentation and depth

    (1993)
  • S. Ullman

    Filling-in the gaps: the shape of subjective contours and a model for their generation

    Biol Cybern

    (1976)
  • Brady M, Grimson W. Shape encoding and subjective contours. In: Proceedings of the 1st annual national conference on...
  • Cited by (17)

    • Using a model of human visual perception to improve deep learning

      2018, Neural Networks
      Citation Excerpt :

      Such interpolation algorithms have been extensively studied in both machine and human vision systems (e.g., Ben-Yosef & Ben-Shahar, 2012; Singh & Fulvio, 2005), and the algorithms generate interpolated curves that seem to closely match human perception. Because of its computational efficiency, we used an approach described in Zhou, Zheng, and Yang (2012) to produce an Euler arc spline between two oriented line-end inducers. However, the Euler arc spline algorithm did not always produce reasonable results, especially when the appropriate interpolation curve would seem to be close to a straight line.

    • A unified account of tilt illusions, association fields, and contour detection based on elastica

      2016, Vision Research
      Citation Excerpt :

      As an example in this paper, the shape in Fig. 2B would be a good candidate for a leaf. This is the very reason it is used in computer vision for contour completion of partially hidden objects (e.g. Kimia, Frankel, & Popescu, 2003; Mumford, 1994; Zhou, Zheng, & Yang, 2012). Apart from the illusions of Fig. 5A, C and D, our model makes several predictions: first, the inhibitory connections seem to be broader tuned than excitatory connections.

    • Geometric Hermite interpolation by logarithmic arc splines

      2014, Computer Aided Geometric Design
      Citation Excerpt :

      Spirals, which have monotone curvatures, find wide applications in the fields of fair shape modeling, highway route design or artistic pattern design, etc. (Meek and Walton, 1992; Wang et al., 2004; Xu and Mould, 2009; Meek et al., 2012). Particularly, the clothoid spiral (also known as the Euler spiral) whose curvature is a linear function of its arc length, has often been used as a primary tool for curve completion or fair shape modeling (Kimia et al., 2003; Zhou et al., 2012). Another popular spiral is the logarithmic spiral whose radius of curvature is a linear function of its arc length.

    View all citing articles on Scopus
    View full text