Object Feature Extraction of Songket Image Using Chain Code Algorithm

— The study was aimed at determining the feature of a motif found in a Songket image in order to make the object detectable and readable. The method used was image color segmentation in the form of a process of segmentation of the image area based on the similarity in colors, which was continued with the binary process that aims to change the image into binary form (0 and 1), so that it only has two colors namely black and white. This study also used mathematical morphology in detecting objects, by using dilation operation and filling holes. After the process of mathematical morphology was completed, the next process was motif extraction by applying moore contour tracking algorithms and the development of chain code algorithms. The results of the process carried out showed that the development chain code algorithm can generate the number of objects, the length of chain code, and probable value of rate of appearances of each chain code in a motif, despite there are some objects in a motif. Then the values are stored into the database as The Feature of Songket Motifs.


I. INTRODUCTION
Image is one of four information contents in the multimedia information technology which continues to develop at this time. Therefore, image has been widely applied in various fields. The needs for image processing can be broadly divided into two spheres. First, sharpening or improving the quality of information contained in the image so that it can be interpreted correctly by the human eyes. Second, the processing of image data for storage requirements and transmission/ communication and to assist in the conduct of machine perception autonomously based on information features contained in the image [1]. Since we have stepped into the digital era of modern technologies, a lot of elements of our new computerized life demand various interactions with the machines. To make them more humancentric and useful, the machines have to be endowed with vision capabilities [2].
This study was focused on the image of songket, starting from capturing songket image, identifying the motifs contained in the image of the songket, as in Fig. 1 that shows the image of songket of West Sumatra with some motifs, namely Baringin (1), Kali (2) and Cindawan (3), followed by separating the motifs from the base color of the fabric up to extracting the feature of the objects on each songket motif. Feature extraction is, therefore, a useful tool for removing irrelevant or redundant information and reducing feature dimensionality. It makes the learning process more efficient, reduces the chance of over-fitting, and improves the generalizability of the model [3], [4], [5]. This research proposes the development of chain code algorithms in extracting songket motifs. The basic idea is tracking the contours of the songket motif with moore algorithms to obtain contours that have been arranged [6], so that it can calculate the value of the chain, the length of the chain value as well as the probability of each object contained in every songket motif that serves as the characteristics of a songket motif that then can be stored in a database.
To build such a system, a research method that consists of several steps, such as those in Fig. 2, is required. Thus, this research consists of six stages.

B. Image Color Segmentation Process
Image segmentation is a fundamental but challenging problem in computer vision, and it refers to dividing the input image into many disjoint subsets such that each one is corresponding to a meaningful region. It is a crucial step in many applications, such as object recognition, image editing, medical image processing and so on [8].
Image segmentation involves the identification of regions of interest, which generally are an object or a part in a digital image. Each region must maximise the homogeneity of its pixels features (colour, texture) and simultaneously maximise the differences with neighbouring regions [9].
The segmentation process was carried out by using a measurement model of similarity (similarity of colors) and the technique of value limit threshold (threshold). Songket image functioned as the input image, in RGB format, and then the determination of threshold value was done followed by the measurement of range of colors using RGB. The color range for RGB color space was mathematically denoted in equations 1 and 2. (1) The results of the segmentation process are in the form of a binary image (as shown in fig. 3). The algorithms performed in the process of segmentation are as follows:

C. Binarization Process
Some of the image processing refers to a binary image. For example, by using a binary image, the ratio of length and width of the object can be obtained. The binary image is part 6. Separate the objects from the background cit_hasilRGB(i,j,:)= Im(i,j,:) 7. Save the images gray-level image which has two grays, a value of 0 for black and 1 for white, so that each pixel of the binary image is always coded by 1.
The binary image resulting from the convertion to black and white mode will be re-processed to detect the location of the regarded objects by eliminating small pixels.
Bwareaopen-Morphologically open binary image (remove small objects). It removes from a binary image all connected components (objects) that have fewer than P pixels. Meanwhile, the resulting binary image in another form i.e. BW2. The default value of 4 and 8 connected neighborhood for 2 dimension, and the default value of 6, 8 and 26 connected neighborhood for 3 dimension. In addition, for higher dimensions can use condef(ndim (BW),'maximal') [10].

D. Cropping Process
The process of cropping is required in an image processing; there are some parts of an image that are not needed in the processing, it can be disposed of by cropping, cropping can be done in various ways, ranging from cropping manually to using available applications / software such as photoshop and many more.

E. Detection Of Object By Using Mathematical Mophology
Mathematical morphology can be used as an image edge detection algorithm. Morphological methods selected in this stage is the process of morphological dilation and filing holes. The flowchart of mathematical morphology processes carried out can be seen in Fig. 6. Mathematical morphology is an approach based on topology and geometric shapes to perform analysis on the image and has become a very useful tool to extract structures and geometry shapes in many applications [11]. Morphological operation is a common operation applied to binary images (black and white) to change the structure of the shape of objects contained in the image. Other than being applied to the binary image, actually, morphological operations can also be subjected to the image gray level [12]. Two basic operations in the process of mathematical morphology are dilation and erosion. To understand the morphological operations, an understanding of set operations such as joint and intersection is absolutely necessary [13].
Dilation operation is one of the bases of morphology processing. Dilation is the operation of "lengthening" or "thickening" in the binary image. This special way and the extent of thickening are controlled by structural elements. Mathematically, dilation is defined as a set operation. A is dilated by B, written as A⊕B, is defined as [10], [14]- [16]. Object detection algorithms with the process of mathematical morphology.

F. Extraction of Motifs
Inbound Tracing obtains contours that have been arranged using moore contour tracking algorithm [6]. Chain code is the method used to represent objects that otherwise limits the chain direction [17]. To make it easier to get the chain code of the pixels neighboring a pixel, need to manufacture index can be calculated by equation 6.

(6)
∆x expresses the different value of two neighboring pixel columns and ∆y expresses the different value of lines of two neighboring pixels [6].
Furthermore, calculate the rate of appearance of each 0-7, calculate the length of the value chain, calculate the probability level of appearance, all following the formula below.   This motif extraction yields a number of objects contained in a motif, the value of the appearance of each level 0-7 (chain value), chain length, and the value of the probability of the chain value, the results can be seen in Fig. 7    In a songket there are various motifs therein. This research was conducted by processing the image by separating one songket motif and other motifs so that traits characteristics of a motif can be acquired in order to be easily recognizable and readable by the computer. Mechanisms used in this study utilizes algorithms that are well known in the image processing such as color image segmentation, binarization, cropping, object detection with mathematical morphology, moore contour tracking algorithms, as well as developing algorithms chain code. The advantage of the development of algorithms that has been doneis that it can determine the value chain, the length of the value chain as well as the probability of each value chain, despite that there are some objects in a motif. The entire value is stored in the database as feature/characteristics of songket motifs that can be used for the retrieval process.

ACKNOWLEDGMENT
We would like to thank Silungkang Art Center Padang for allowing capture images songket and usage data. Furthermore, we would also like to thank the songket craftsmen who have helped in the analysis of the imagery used to determine the names and positions of the motif contained within the image songket.