Curve Reconstruction In Different Cubic Functions Using Differential Evolution

. This paper discusses the comparison on using two types of curves for curve reconstruction. Differential Evolution (DE) is used to optimize the parameter in the related spline function. DE minimized the Sum Square Error (SSE) to find the best curve that fit the data. The two curves namely cubic Bézier and cubic Ball is used for comparison purposes. For the curve reconstruction, the cubic Ball consumes less calculation time compare to cubic Bézier and gives better curve approximation based on the errors result. Visualization and numerical comparison shall be given.


Introduction
Curve reconstruction is a process of reconstructing a curve or a mathematical function, which has the best fit to a set of data points, possibly subject to certain constraints. It becomes one of the main issue highlighted by recent researchers especially in image processing as well as computer graphics pattern recognition and computer aided geometric design (CAGD) in solving reverse engineering problems [1]. According to [2], the purpose of this curve fitting is to find the set of data points that can accurately represent the given curve. Variety splines have been discussed in the literatures to represent the curve like cubic Bézier curve [1], [2], [3], [4] quartic Bézier curve [5] and B-splines [6], [7]. Other than that, [8] used ball cubic curve to represent the curve.
Soft computing is a recent keyword in information technologies. Soft computing based optimization methods has been used as an attempt to find the best solution in solving various types of problem especially in complex engineering problems. This is mainly due to inefficiency of classical optimization algorithms in solving complex problems. These methods do not guarantee optimal solution but require a relatively short computational time. There are several techniques in soft computing that grabs the attention of researchers such as Genetic Algorithm (GA) [7], [9], Differential Evolution (DE) [5], [10], [11] , [8] and Artificial Bee Colony algorithm (ABC) [12], [13], [14].
In this study, the comparison of two different curves which are cubic Bézier and cubic Ball with Differential Evolution has been proposed in order to find the best curve in solving curve fitting problem. Differential Evolution (DE) has been chosen as a propose technique in solving curve fitting problem because this algorithm offers great convergence characteristics and require few control parameters. According to [15], the use of mutation operation, crossover operation and greedy selection makes DE a fast converging evolutionary algorithm. Not only that, the minimum number of control parameters of DE makes it easy to be tuned in order to find best solution [16] and [17]. Besides that, DE able to find the acceptable solution with reasonable time demand, but efficiency of the search is sensitive to the setting of control parameters [18].

Bézier
As been mention in the introduction, Bézier curve has been proposed by many researchers in solving curve fitting problems because of their being computationally efficient and having high level of accuracy to approximate character shapes [19], [20]. Bézier curve is defined as a parametric curve ( ) R t that use the Bersnstein polynomials as a basis. In general, the equation of Bézier curve is given by: B t is a basis function for Bézier curve and i P refers to the control points of the curve. The basis function of the curve can be defined as the following: The curve can be represented in any degree n with 1 n  control points [5], [1], [14], [21]. For this study, cubic Bézier curve with has been chosen as a proposed curve. Note that, for cubic Bézier curve, it consists of four control points which are 0 P , 1 P , 2 P , and 3 P . This curve interpolates the two end control points 0 P and 3 P and approximate the two intermediate points 1 P and 2 P . Figure 1 shows the example of Cubic Bézier curve of degree three.

Cubic ball
Cubic ball basis was introduced by [22]. As blending function, Ball curve have several properties that used in various aspects such as coordinate system independence, convex hull property, symmetry, end point interpolation and etc. The basic functions are: The equation for cubic Ball function similar to cubic Bezier in terms of the number of points needed. However, this function gives a great potential when recently a few research demonstrated the advantages of this function. The most often mentioned from researchers is the ability to generate curves in a quicker time. In other hand, the property of end point interpolation makes this function as a suitable interpolant to connect point by point. Therefore, in curve reconstruction, we need a function that can interpolate every point. Hence, an appropriate interpolant can created by using cubic Ball basis.  Figure 2 shows the example of cubic Ball curve.

Differential evolution
Differential Evolution (DE) was proposed by Rainer Storn [23]. DE is an extremely powerful yet simple evolutionary algorithm that improves a population of individuals over several generations through the operators of mutation, crossover and selection for global optimization. It has successfully been applied to diverse domains of science and engineering, such as mechanical engineering design, signal processing, chemical engineering, machine intelligence, and pattern recognition [24]. Besides that, DE also has been used to solve optimal power flow problems [16], [17] and [25]. The process involved in DE algorithm are Initialization, Mutation, Recombination and Selection. These process are described as below and being summarized in Figure  3.

Initialization
The algorithm starts by creating an initial population of by using the following formula: where   0,1 rand is a uniformly distributed random number lying between 0 and 1 . Whereby is an upper boundary and lower boundary of the population respectively. The population size is an algorithm control parameter selected by the user which remain unchanged throughout the optimization process.

Mutation
DE process continued with the process of mutation strategy. In this process, each generation (or one iteration

Initialization Mutation
Combination Selection of the algorithm) will change the population member known as target vector, , i G X , by creating a donor vector , i G V . The mutation is based on the difference between two individuals randomly chosen from the current population [26]. There are various method of creating this donor vector that differentiates one DE scheme from another. In this paper, we only focus to the scheme of DE/rand/1 in producing the donor vectors. Several variance of DE mutation strategies are described in the following, [23], [27], [28]. In these scheme, for each vector , , i G X a donor vector , i G V is generated according to the following: The notation DE/rand/1 specifies that the vector to be perturbed is randomly chosen, and that the perturbation consists of one weighted difference vector. In this process, vector randomly such that they are mutually different indices from the current generation. The mutation factor, F is normally used is 0.5 1 F   , [23] and also chosen 0 2 F   , [16] and [17].

Recombination
The recombination process incorporates successful solution from previous generation where the trial vector From equation (7), CR become a control parameter of DE just like .
F The value of the CR is between the range of   0,1 .

Selection
The next step is called selection. This step will determine whether the target or the trial vector survives to the next generation. The selection operation is described as , , where   f X is the function to be minimized. So, the best (lowest) fitness value will be included in the next generation. Mutation process, recombination, and the selection process will be repeated until some stopping criterion is reached. Commonly, stopping criteria are satisfied when a predefined small number of fitness value or a fixed number of generation or iteration have been reached.

Boundary extraction and corner detection
The proposed method starts with finding the boundary of the generic shape and then using the output to detect the corner points of the image. The image of the generic shape can be acquired by scanning or by some other method. The purpose of the boundary extraction is to produce an object's shape in graphical representation in a number of boundary points. There are a lots of algorithm that has been used in order to extract the boundary of the generic shape such as [29], [30], and Chain Codes [19]. But in this paper, we used the MATLAB function that called Boundaries in order to extract the boundary of the font images.
After finding out the boundary points, the next step is to find the corner detection of the generic shape. The corner points can also be described as the point that separates the outline into various segments. Some of the possible methods to detect the corner points is Davis algorithm. This algorithm has been applied in the research of [19] and [30]. For the detection of corners, in this paper, we used SAM06 algorithm [31].
According to [31], SAM06 algorithm is robust, simple to implement, efficient and performs well on noisy shapes as well. Detected corners by SAM06 were precise and without detecting any wrong ones. Besides that, we also used Douglas-Peucker algorithm [32] in order to reduce the data in a particular curve. The purpose of this algorithm is to create same curve by using a small number of data. We hope that this algorithm can reduce the computational time.
We have decided to use different types of image such as the Japanese (Kanji) character, and image of heart and fork. Details for the boundary extraction and corner detection of the images is shown in Table 1.

Result and discussions
Generally, DE could be used for curve fitting. In this paper, two type of splines explained. Before using the splines, a few pre-processing steps needed in order to interpolate the data. However, to test which curve have a good result, the curve fitting generated needed to compare with original image to measure the error or known as SSE. As the result demonstrated, the reconstruction have similar image visually, while the error as shown in Table 2 give different result where the cubic Ball lead all from the four examples. Table 3 reflect the result in terms of time where the cubic Ball give impressive result compare to cubic Bezier curve. This is because of the degree in cubic Ball less cubic Bezier. Figure 4 illustrate the curve reconstruction for the image selected. Step 1: Get appropriate image to reconstruct Step 2: Boundary extraction from the image to acquire data points.
Step 3: Corner points detected Step 4: The DE for curve reconstruction using: a) Cubic Ball curve. b) Cubic Bezier Step 5: Calculate the number of errors and total time taken.