#### Abstract

The goal of this study is to assess the efficiency of Artificial Bee Colony (ABC) algorithm in finding the optimal solution of curve fitting problem specifically for medical images. Data of Computed Tomography (CT) images from two different patients were collected. The procedure of curve fitting for medical images include conversion of Digital and Communications in Medicine (DICOM) images to binary images, boundary and corner point detection, parameterization, and curve reconstruction by using ABC algorithm. Then, Sum Square Error (SSE) was used to calculate the distance of the fitted Cubic Bezier curve with the boundary of the original images. Based on the calculation and parameter tuning that had been done, the smallest error of both skulls is and , respectively. The finding of this study illustrated that the proposed method had efficiently produced fitted Bezier curve that resemble the original medical images. In addition, the used of Douglas Peucker algorithm helps to improve the performance of the proposed method since computational time can be minimized. This study had shown that the proposed method can be used as an alternative method in order to reconstruct or redesigned the medical images since it produces a small error. For future work, we are planning to explore and applied the ABC algorithm to reconstruct the missing part of the skull since it can reduce the time taken to produce the skull implant as well as reducing the cost of producing it.

#### 1. Introduction

The process of representing an existing object geometrically in form of computer aided design (CAD) model is called reverse engineering where it referred to the process of computing a curve close to the data point set of the bitmap images [1]. The basic procedure of curve fitting process involved boundary and corner point detections, parameterization, and curve fitting [2]. Several studied had been done in this area [1–7]. However, because of the demand in the industries, new curve fitting algorithm is always being highlighted to acquire curves that satisfy different conditions.

Artificial Bee Colony (ABC) algorithm is one of the many swarm based algorithms that attract the attention of most researchers because of its ability and advantages in dealing with various problems including optimization problems, object recognition, data mining, and image clustering curve fitting [2, 4, 8]. A simple main algorithm and implementation of ABC are found to be very effective in the studies above since they produce very good results at low computational cost. There are three main categories of research regarding ABC that had been discussed in the literatures which includes comparison and modifications, hybrid models, and applications [9]. Numbers of researches had been done to access the ability of ABC algorithm by comparing with other optimization algorithms such as Genetic Algorithm (GA), Particle Swarm Algorithm (PSO), Differential Evolution (DE), Evolutionary Algorithm (EA), and Ant Colony Optimization (ACO) [9–12]. The computational results of above studies showed that ABC outperforms the other algorithms. Not only that, but also several researches had combined ABC algorithm with other optimization algorithm so that it become more powerful. This combination is called hybridized ABC. For example, Xiaohu Shi et al. in 2010 had proposed an integrated algorithm based on ABC and PSO. Numerical result of that study shows that this hybrid algorithm is effective and perform better than ABC or PSO alone [13]. Other than that, a novel hybrid approach had been discussed whereby the combination of GA and ABC had been used for tuning Proportional Integral (PI) speed controller in a vector-controlled Permanent Magnet Synchronous Motor (PMSM) Drive. The simulation results of this hybrid algorithm then are compared with other methods such as gradient descent method, GA, and ABC. The computational results of the hybrid approach works better compare to other methods [14].

Other than that, ABC algorithm also has been used to solve application problems such as signal processing applications, optimization problems encountered in electrical engineering, wireless sensor networks, and others [9]. Recently, numbers of researchers had explored the use of optimization algorithms in handling medical problems. For instance, the reconstruction of craniofacial fracture by using rational cubic Ball curve had been proposed in the literature. In that study, GA is used as an optimization algorithm to handle craniofacial reconstruction problem [15]. The finding shows the proposed interpolant work well for solving this problem. Not only that, but also few studies related to the medical images have been discussed by researchers [16, 17]. Hence, in this study, we will access the ability of ABC algorithm in handling curve fitting problems focusing on medical images which is a skull.

Choosing an appropriate curve also affect the performance of curve fitting. Numerous curves had been chosen by the researchers such as B Spline, cubic Spline, cubic Bézier curve, and quartic Bézier curve for solving curve fitting problems [2–7, 18–22]. Apart from all those curves, Bézier curve grabs the attention of most researchers because of its advantages and interesting properties which make it differ from other curves [21]. This paper can be divided into six sections. Section 2 discussed the Bézier curve and the Artificial Bee Colony in general. Then it was followed by explaining the process involved in Artificial Bee Colony algorithm. Next, explanation on how the algorithm works for skull reconstruction had been done in Section 5. Lastly, the paper has been concluded in Conclusion section.

#### 2. Bézier Curve

Bézier curve was developed by Paul de Casteljau in 1959 and by Pierre Étienne Bézier in about 1962. The mathematical theory of this curve is based on the concept of Bernstein polynomials [23]. Bézier curve is defined as a parametric curve which can be in any degree with control points [3]. Generally, it can be written aswhere are called control points and are blending functions, known as Bernstein polynomial [24]. In most of curve fitting problems, cubic Bézier curve has been used as the proposed curve as well as these studies [3, 4, 18, 19, 25]. Cubic Bézier curve is generated with four control points, , where varies from zero to three. From (1), we can illustrate cubic Bezier curve asAs shown in (2), control points and are the end points while and are two middle points [4]. This study focuses on how to estimate those middle control points. In general, control point estimation is defined as a process of searching the most suitable position of and that will produce a better curve. Hence, Artificial Bee Colony optimization technique has been applied to optimize those points.

As has been mentioned in the introduction, numbers of researchers choose Bézier curve in dealing with reconstruction problems because of its advantages and interesting properties which make it differ from other curves. For instance, in medical application, Bézier curve had been applied for the modification of human face image for personal identification [26]. In this work, the outline of the facial features was obtained from some key points. Then, it will be connected in the form of Bézier curve before being simulated by the system. Other than that, Bézier curve has also been used in prosthesis modelling problem whereby the curve had been applied to create the contours descriptors [27]. Therefore, in this study, cubic Bézier curve will be applied to reconstruct the medical images.

#### 3. Artificial Bee Colony

Artificial Bee Colony (ABC) is one of the swarm intelligence-based algorithms that grab the attention of many researchers especially in solving optimization problems. ABC was proposed by Karaboga in 2005 which has been inspired by the behaviour of honey bees [8]. This method consists of three essential components, namely, food sources, employed foragers, or known as employed bees and unemployed foragers or named as unemployed bees. Unemployed foragers can be classified into two main groups which are known as onlooker bees and scout bees [10]. All these foragers play different but important roles in ABC algorithm.

Before selecting a food source, there are several elements that need to be alert to ensure the value of the food sources such as its closeness to the hive, the taste of the nectar, the ease of extracting the nectar, and the profitability of the food sources [11]. Employed bees are assigned to carry all that information and share with the onlooker bees via waggle dance. Then, they will try to find the food source based on the information gathered by the employed bee. If the onlooker bee found a better food source, the new food will replace the old ones and onlooker bee become an employed bee again. But, if the better food source could not be found at a certain limit, then the old food source will be abandoned and the bee will become scout bee. The scout bee will go to search a new food source randomly [28]. The next section explained how ABC algorithm works which resembles the foraging behaviour of bees.

#### 4. ABC Algorithm

There are four main phases involved in this algorithm, namely, initialization phase, employed bee phase, onlooker bee phase, and lastly scout bee phase. In ABC algorithm, each food source referred to as a position of a feasible solution and objective function represents the quality of the food source discovered by the bees [29]. During the initialization process, the number of employed bees are set to be equal to the number of onlooker bees and also equal to the number of food sources. Not only that, but also maximum cycle number, population size, and limit will be set. Beginning of the process, a set of initial populations of solution, , is generated randomly by using expression (3) as follows:where varies from to , varies from to , and is a random number within the range . and are referred to as number of employed bees and dimensional of solution space, respectively. After having the initial solution, the calculation of the objective function is done by using any specific formula depending on the problem [4]. Then, the evaluation of the fitness function of each food source is calculated by using where is the objective function that was mentioned before. After the initialization process, each of the employed bee, , explore a new food source known as in the neighbourhood of its present position as follows:As shown in expression (5), represent a random neighbourhood that has to be different from whereby is a randomly selected dimension and is a real number in the range of [30]. Then, the fitness value for a new solution, , is calculated by using expression (4) and will be compared with the fitness value of the old one, . This selection process is known as greedy selection whereby if is better than , will replace as a new solution and the old one is discarded. Otherwise, is kept as it is [31–33].

After all the employed bees completed the searching process, they will share the information as mention in the previous section to the onlooker bees. Then, each of the onlooker bees were assigned to make a decision either to select the food source advertised by the employed bees or not. Hence, the probability of each of the food source to be selected can be calculated by using expression (6) where is the fitness value of the ith food source and referred to the total fitness value [34]. Next, the modification of the food source is done by updating the position of the food source in order to find a new and better solution. This modification can be done by using expression (5) and again the greedy selection process will be applied to choose the best food source.

The last phase in ABC algorithm is known as scout bee phase. During this phase, if the food source cannot be improved through a limited cycle, then the food source is assumed to be abandoned. Hence, new food source is randomly determined by using expression (3). Notice that the value of predetermine number of cycles which is known as limit is an important control parameter in this algorithm for the purpose of abandonment [35]. At first, this limit is set to be zero. If the solution could not be improved, the trial value will be increased by one or else it will be reset to zero [36]. The process will be repeated until the termination criterion is satisfied or it achieved the maximum cycle number that has been set during the initialization process. The summarizing process of ABC algorithm is illustrated as in Figure 1.

#### 5. ABC for Curve Fitting

The first phase of curve fitting process is called boundary and corner point detections. Before it can be done, the selected images must be in form of bitmap or digitized images. For this study, the data of Computed Tomography (CT) images of skulls from two different patients were collected and the data is in Digital and Communication in Medicine (DICOM) images. Therefore, the conversion of DICOM images to bitmap images had been done. Figure 2 demonstrated the bitmap images of the skulls.

Next, the boundary of the medical images was obtained by using a built in MATLAB function called boundaries. The boundary extraction process was done to obtain the object’s shape in graphical or nonscalar representation [21] and this process is important in order to preserve the complete shape of an object [1]. After boundary extraction had completed, the corner points will be detected by using SAM algorithm. Corner points are classified as points that partition the boundary into several segments. This step is important since it gives important clues for the shape representation analysis [21]. At this phase, Douglas Peucker algorithm had been applied to minimize the data points so that it can reduce the computational time. Boundary of medical images and detected corners of the boundary can be represented as in Table 1.

The next stage in curve fitting process is called parameterization. As is mentioned above, cubic Bézier curve is generated with four control points. The expansion of (2) can be represented in matrix form as follows:Before we can estimate the intermediate points and , we need to estimate the values of as in (6). For this study, chord length parameterization had been applied to estimate the value of associated with each point by using the following.The climax of this process is called curve fitting. At this phase, ABC algorithm was used to estimate the two middle points and . There are several parameters involved in this process which are population size, number of iterations, limit, and dimension. In this study, population size is set to be 50 with 100 number of iterations. The middle points and consist of and , respectively. Therefore, the dimension is set to be four since it represented , and Lastly, the limit is set to be 100. As has been mentioned in previous section, this limit is very important for the purpose of abundant. When the limit reached 100, if the solution is not improved, the solution will be abandoned and new solution will be searched.

After having the best value of and , the fitted cubic Bézier curve is obtained. Note that the main objective of this study is minimizing the distance between boundary of the original images and fitted cubic Bézier curve obtained by using the propose method. Hence, Sum Square Error (SSE) had been chosen as the objective function, , to calculate the error given by those two curves. In addition, for this study, the stopping criterion has been decided in which every process will be repeated ten times and the mean error had been recorded. Figure 3 illustrated the demonstration of the fitted cubic Bézier curve (black line) over boundary of original images (blue dot) and the error given by those two curves. The error given by skull of patients 1 and 2 is 57.5754 and 28.8628, respectively. As shown in Figure 3, most of the fitted cubic Bézier curve is on the boundary of original images. In a nutshell, it can be concluded that the proposed method can be an alternative method to reconstruct the curve.

#### 6. Conclusion

This study focused on the reconstruction of medical images by using Artificial Bee Colony Algorithm. Findings of this study show that the proposed method can be used as an alternative method in solving curve fitting problems since it produced an accurate representation with the original images and less error. The use of Douglas Peucker algorithm also affects the result since it reduced the number of data points. This study can be extended by exploring how this algorithm works when dealing with reconstruction of the missing skull since it can reduce the time taken to produce the skull implant as well as reducing the cost of producing it.

#### Data Availability

Data obtained from Digital and Communications in Medicine (DICOM) images have been used for the purposes of optimization.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This study was fully supported by Fundamental Research Grant Scheme (FRGS) 2017 9003-00627.