Geometric Feature Extraction of Batik Image Using Cardinal Spline Curve Representation

Batik is an Indonesian national heritage which has been recognised as a world cultural heritage (world heritage). Batik is widely used as clothing material. The advancement of technology allowed the material optimisation in clothing design. Geometrical information about abatik image is required in a module for optimising clothing design with batik as a raw material. Geometric feature extraction of batik image is used to help a computer to recognise batik's pattern or motif. This research proposes a method for geometric feature extraction of batik image by using cardinal spline curve representation. The method for geometric feature extraction is divided into 2 processes, i.e., feature extraction for Klowongan and feature extraction for Isen-Isen. Klowongan represents the pattern of batik image, whereas Isen-Isen is content patterns of Klowongan. Feature extraction of Klowongan is performed by deleting collinear points from object boundaries until the dominant points are obtained. The dominant points are then used as control points. Feature extraction of Isen-Isen is performed by saving coordinates of every connected component which are also used as control points. Geometricfeature of batik image is represented as a set of control points of klowongan and isen-isen. Batik image can be reconstructed by drawing cardinal spline curve using a set of control points in the geometric representation. The experiment shows that the reconstructed image is visually similar tothe original batik


Introduction
Batik is a craft that has high artistic value and has become part of the Indonesian culture (especially Java) for a long time.Etymologically, the suffix "-thik" in the word "bathik", is derived from the word drip or trickle.The word "mbathik" comes from the word "thik" which means small [1].Thus it can be said that "mbathik" is writing or drawing complex (small) objects.Batik as the famous and unique traditional legacy in Indonesia is also recognised as a world cultural heritage.The recognition of batik as world cultural heritage has made batik more famous and widely used as clothing material.Batik has unique motif characteristics.The decoration and batik motifs are designed through human cognitive processes that represent artistic interpretations of the surroundings.This is regarded as one of the most interesting aspects to be studied using science and technology.
In developing a system for fashion design automation and material (batik) optimisation, a method to extract geometric features of batik image is required.The extraction method can help a computer to recognise patterns of a batik image.Extraction features play an important role in detecting the object correctly [2].Geometric feature extraction has an important role in understanding object shape in batik patterns or motifs.Geometrical features of an object areconstructed by a set of geometrical elements such as points, lines, curves or surfaces.The features in this context include geometric features of object boundary (klowongan in Javanese language) and geometric features of object filler (isen-isen in Javanese language).
A process of feature extraction is followed after the process of image segmentation [3].Segmentation is a very important step in object recognition.There are various segmentation methods that can be used.One of them is the thresholding method which is often used because it is easy and intuitive.Another method is neutrosophic-based segmentation, which has successfully separated objects and background [4].
Many studies on object representations have been conducted.The studies include polygon approximation and curve representation.A set of points of object boundary (contour) is used to obtain polygon approximation of the object [5].Then, dominant points are obtained from  ISSN: 1693-6930 TELKOMNIKA Vol. 12, No. 2, June 2014: 397 -404 398 the contour by removing collinear points.If the shape of the object contains curve element, then the polygon approximation cannot provide satisfactory results.Another approach that can be used to represent curve element quite well is curve representation method.Bezier curve is a polynomial curve of n degree which combines control points in image depiction.One of the weaknesses of Bezier curve is the absence of local control property because shifting of one control point will affect the overall shape of the curve.This weakness has urged an idea to multiply low degree Bezier curve segments called cardinal spline.Graphic objects are split into several segments so that shifting of control points will modify only some parts of curve segments.
Other studies related to batik image include motif-based batik retrieval system [6] and motif classification of batik image [7].This research proposed a method of geometric feature extraction of batik image and represented the features as control points of cardinal spline curves.The proposed method consists of three parts: extraction of geometric features, representation of the features using cardinal spline curve, and reconstruction of batik image.

Literature Study
This section explains the theories that serve as the basis for this research.They include a neutrosophic approach to segmentation and the Cardinal spline.Freeman chain code, canny edge detection, and connected component labeling are not discussed further in this study because those methods are very common in image processing.

Neutrosophic approach to segmentation
Neutrosophy is a branch of Philosophy that studies the origin, nature and scope of neutralities.Neutrosophy can be considered as a proposition, theory, event, concept or entity.Supposed that <A> is an event or entity, <Non-A> is not <A>, and <Anti-A> is the opposite of <A>.<Neut-A> is defined as the addition of not <A> and not <Anti-A>.For example, if <A> = white, then <Anti-A> = black.<Non-A> = Blue, yellow, red (other than white).<Neut-A> = Blue, yellow, red (other than white and black).
In this paper, an image is transformed into a neutrosophic domain.A pixel in the neutrosophic domain can be represented as P {T, I, F}, meaning that the pixel has t% of true, i% of intermediate, and f% of false, with the value of t, i, and f range from 0 to 100.In fuzzy logic, the i value = 0.
Neutrosophic approach to segmentation based on watershed method has been carried out [3].Steps in the neutrosophic approach to segmentation based on watershed method is described as follows:

Mapping and determination of {T, F}
At this point, mapping and determination of the image matrix T domain and F domain are done.T is the object and F is the background.To determine the value of T and F that include neutrosophic components, the following S-function is used: where g xy is the intensity value of pixel P(i, j).Variables a, b, and c are parameters that determine the shape of the S-function.(g).Assume that the peak is first discovered as g min and then g max is found.5. Specify the lower limit of grey level B 1 dan upper limit of B 2 : where f 1 =0,01 (obtained from the results of the experiment).g_min is a grey level value greater than 0 and was first discovered.While is a grey level value greater than 0 and it is the value that is found the last.6. Determine the value of a and c parameters: 7. Calculate b parameter using the principle of maximum entropy: where S n ( ) is Shannon function defined as: Value parameter b lies between values a and c.To get the optimal value of b, the checking on all possible values of b is necessary.The optimal value of b will generate the greatest value of maximum entropy H(X): , , , max , , , | .

Enhancement
Having obtained the new image on neutrosophic domain, enhancement process is done.This process aims to improve the image of the new domain.Enhancement process is done using intensity transformation.Here is a function that is used to make improvements to the image in the neutrosophic domain: Where E (T(x, y) is image enhancement of domain neutrosophic.T(x, y) image in domain neutrosophic.

Thresholding
One way to retrieve the objects from its background is to select a threshold value T that can separate the groups from each other.Threshold value is determined by using a heuristic approach [9]: 1. Determine the initial threshold t 0 on f(x,y) 2. Separate f(x,y) using t 0 , and then group them into 2 groups of new pixels, F 1 and F 2 3. Find the mean values of μ 1 and μ 2 from each group F 1 and F 2 4. Compute a new threshold value using the equation t 1 = (μ 1 +μ 2 )/2 5. Repeat step 2 through 4 so that the difference between the value of t n -t n-1 < ε (where ε = 0.0001).If these conditions are met, tn is defined threshold value.

Cardinal Spline
Cardinal spline is a spline interpolation using the pull (tension) to form a curve.Cardinal spline interpolation is a modification of the quadratic Bazier spline using the splicing process with C1 continuity [10].One segment of the cardinal spline curve is defined by four control points, the curve will interpolate the control points and the fourth must satisfy the following equation: where is tension parameter, u is the vector of knots, and pi are the control points.In this study, used is 0.5.

Geometric feature extraction of Batik Image
Geometric feature extraction of batik image has an important role in understanding object shapes in a batik image.Geometric features are features of object constructed by a set of geometrical elements like points, lines, curves or surfaces.Geometric features in a batik image are geometric features of pattern (klowongan in the Javanese language) and geometric feature of filler pattern (isen-isen in the Javanese language).

Geometric feature extraction of klowongan
Klowongan in the batik image is the archetypal form of the batik image.Klowongan of a batik image is shown in Figure 1.Geometric extraction feature of klowongan is shown in Figure 2a. the segmentation result, connected component labeling can be determined using 8neighborhood.Each component labeling will determine direction data of object in the image by means of chain code method and coordinate position objects will be stored.Chain code algorithm used in the extraction 8-connected is as follows [11]:  Determine the pixel of the object whose value is in top left row; assume this pixel P 0  Determine the dir variable (for directions).Set dir = 7 (since P 0 is the top-left pixel in the object). Traverse the 3x3 neighbourhood of current pixels.Begin the search at the pixels in the direction dir + 7 (mod 8) for even dir or dir + 6 (mod 8) for odd dir (Figure 3 (b-d)).Table 1 shows the direction of the dir and the next dir that resulted in anticlockwise direction:  The first foreground pixel will be the new boundary element.Update dir.
 Stop when the current boundary element P n is equal to the second element P 1 and the previous boundary pixel P n-1 is equal to the first boundary element P 0.
Figure 3 shows the determination of P 0 and determination of the directions using chain code algorithm.Geometric feature reduction of klowongan is performed by finding dominant point in each shape of object based on the direction chain code.Step by step to determine dominant point by removing collinear points [4]:  Select three points as initial point.For example P i , P j , dan Figure 4 shows a method to obtain dominant points.After dominant points are obtained from the reduction process, coordinates of the dominant point of each object are stored in a database that will be used for image reconstruction using cardinal spline.

Geometric feature extraction of isen-isen
Isen-isen is klowongan filler of batik image.Example isen-isen of batik image is shown in Figure 5. Geometric feature extraction process of isen-isen is shown in Figure 2b.Geometric feature extraction of isen-isen is done by incorporating batik RGB image, convert it into grayscale and insert the image segmentation results.Boundary detection of the grayscale image is done using Canny method.Isolation of isen-isen is carried out to obtain isen-isen of batik image.This process is done by multiplying the matrix image of Canny edge detection results with the matrix of erosion-segmented image.The next process is connected component labeling and storing the isen-isen coordinates into the database which will further be used as a control point in the reconstruction by using a cardinal spline.

Batik image reconstruction of cardinal spline curve representation
Result of geometric feature extraction of isen-isen and klowongan is represented in a set of dominant points.This set of dominant points that has been stored in the database will be used as a control point in the batik image reconstruction using a cardinal spline as described in section 2.2.The original image, size and processing time are shown in column 1. Black and white image as input from klowongan extraction process is shown in column 2. Isolated image of Isen-isen is shown in column 3. The results of the proposed algorithm are in column 4. The result of connected component labeling of the klowongan and isen-isen image is not shown because it contains the same black and white image as the klowongan and isen-isen, only that the connected component labeling contains one object which is connected to 8-neighbourhood.In all the batik images used in the experiment, our algorithm can interpolate a set of control points which are given based on cardinal spline curve representation of klowongan and isen-isen.Visually, the result of reconstruction using cardinal spline gives similar results to the original image.From the experiment, the third batik image has the fastest processing time, i.e. 62.87 seconds, while the fourth batik image has the longest processing time, i.e. 1152.77seconds.Based on the image processing result of klowongan and isen-isen, the third batik image has the least connected component labeling, which results in fewer sets of control points.The fourth batik image, on the other hand, has the most connected component labeling, which also results on more sets of control points.The processing time in this experiment is not determined by the image size.Instead, it is determined by the set of control points used in the representation of cardinal spline curve.

Conclusion
Experimental results show that the proposed system can perform geometric features extraction of batik image, represent the features into some control points of cardinal spline curve, and reconstruct the batik image by using the cardinal spline curve representation.The result shows that reconstructed image is visually similar to the original batik image.


P k  Define threshold value, (d t )  Delete point Pj with distance value (d) of the straight line from Pi and P k .If d ≤ d t .distance (d) is calculated as: Repeat step c, and stop if Pj = Pi.

a b Figure 2 .
Figure 3. (a) Determination P 0. (b-d) Determining the next direction
Size : 640 x 480 Time : 342.61 second  ISSN: 1693-6930 TELKOMNIKA Vol. 12, No. 2, June 2014: 397 -404 404 Compute the image histogram 2. Determine the local maxima of the histogram, His max (g 1 ), His max (g 2 ),…, His max (g k ) 3. Calculate the average value of local maxima with the following equation: The value of the variables a, b, and c are calculated based on the histogram [8]: TELKOMNIKA ISSN: 1693-6930  Geometric Feature Extraction of Batik Image Using Cardinal Spline Curve .... (Aris Fanani) 399 1. ∑ 4. Determine the local maxima as a peak whose height exceeds His max

Table 1 .
Direction and next direction