TOWARDS CLASSIFYING CLASSICAL BATIK IMAGES - Unpar
TOWARDS CLASSIFYING CLASSICAL BATIK IMAGES - Unpar
TOWARDS CLASSIFYING CLASSICAL BATIK IMAGES - Unpar
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>TOWARDS</strong> <strong>CLASSIFYING</strong> <strong>CLASSICAL</strong> <strong>BATIK</strong> <strong>IMAGES</strong><br />
Veronica S. Moertini 1<br />
Email: moertini@home.unpar.ac.id<br />
Fax: (022) 2501023<br />
Abstract:<br />
Many kinds of batik style have been produced including the one called classical batik. Currently, batik images have<br />
been produced and used such as by government institutes and online stores. Sometimes people would need to search<br />
certain style of batik electronically. To speed up the search, batik could be first classified so that the search is done<br />
in a limited collection of batiks. The aim of this research is to find a method that could classify classical batik<br />
images automatically based on the shape of ornaments and batik textures. Canny edge detector is used to generate<br />
the edges of the ornaments. Shape feature is generated using Fourier transform, moments and points of edge.<br />
Wavelet-based and discrete-cosine-based techniques are used to generate the texture feature. Image similarity<br />
between the new image and each training image is computed for each feature. Finally, a back-propagation neural<br />
network is used to determine the class of the new image.<br />
Keywords: image classification, shape feature, texture feature<br />
Introduction<br />
Batik has a very special place in the world of textiles. Many kinds of batik style have been<br />
produced, such as batik kraton (batik from the courts), batik sudagaran, batik Belanda, batik<br />
Cina, batik Djawa Hokokai, and batik Indonesia which also called batik modern [(Kerlogue, F.,<br />
2004), (Doellah, S., 2002)]. These types of batik differ in terms of their motifs, the way they are<br />
produced, color variety, coloring material, and cloth material. Traditional batiks from the courts<br />
of Java are also called classical batik (van Roojen,P., 2001). They are still largely being produced<br />
and their motifs are sometimes used in batik modern design. Currently, batik images have been<br />
produced and used such as by government institutes and online stores to provide services to<br />
people who need them. Sometimes people would need to search certain styles of batik. To speed<br />
up the search, batik could be first classified so that the search is done in a limited collection of<br />
batiks. At this early stage, this research aims to find a method that could classify classical batik<br />
images automatically (into its sub-classes) based on their ornaments shapes and textures.<br />
Batik<br />
The items formed classical batik patterns or motifs can be broken down into two parts: the main<br />
and additional ornaments, and isen-isen (small ornaments used to fill the empty space in or<br />
between ornaments). The main ornaments define the motif style and they usually have some<br />
1 Dept. Teknik Informatika ITB (Doctorate Student), Labtek V, Jl. Ganesha 10, Bandung 40132, Indonesia<br />
Jur. Ilmu Komputer (Lecturer), Gedung 9, Unika Parahyangan, Jl. Ciumbuleuit 91, Bandung 40191, Indonesia<br />
1
meaning. Some examples of the main ornament are garuda, meru (mountain), trees, temple,<br />
parang. Based on the ornaments and their structures, classical batik can be classified into two<br />
major classes, which are geometry and non-geometry [(Kerlogue, F., 2004), (Doellah, S., 2002),<br />
(Susanto, 1980)]. The two classes can then be further divided into subclasses, which are banji,<br />
ganggong, ceplokan, etc. (See Table 1.)<br />
Tabel 1. The classification of classical batik.<br />
Motif<br />
Geometrical Motifs<br />
Description Examples of Batik<br />
banji Its basis is swastika, a simple cross with arms of equal<br />
length, each arm bent at right angles pointing in the<br />
same direction. The motif is built up from swastika<br />
interconnected at angles of 90 degrees.<br />
banji bengkok, guling, kerton<br />
ganggong Square, filled with ganggong plant and diagonal lines ganggong branto, sari, rejuna,<br />
kurung, yojana<br />
ceplokan Repetitive shapes of circle, ellip, square, square with kawung picis, sen; ceplok keci,<br />
smooth corner, rosette, star, cross sections of fruit. nogosari<br />
anyaman, Recognized by the rows of dots and short stripes that rengganis, nitik krawitan, tirta<br />
nitik run parallel and at right angles in a pattern that<br />
imitates woven decoration.<br />
teja alit<br />
parang, Gently curved design is run diagonally in a powerful parang barong, baris, centong,<br />
lereng rhythm, the space between parallel running is filled<br />
with small ornaments (isen-isen).<br />
Non-Geometrical Motifs<br />
kembang, kurung, rusak, etc<br />
semen Filled with mountains (meru) or places to grow<br />
plants, plants and animals ornaments. Ornaments are<br />
placed almost freely.<br />
semen gurdo, kasut, Yogya<br />
lung-lungan Similar to semen but with less ornaments and without Babon angrem, grageh walu,<br />
meru.<br />
lung klewer, peleman<br />
The Proposed Classification Technique<br />
The aim of the classification is to classify classical batik images into their sub-classes (banji,<br />
ganggong, ceplokan, etc). Hundreds of batik images have been collected, and after observing the<br />
classical batik images, it is found that: (1) The image color could be light (high intensity) or dark<br />
(low intensity). (2) The edges of batik ornaments could be clearly visualized (with high contrast)<br />
or fuzzy (with low contrast), and the size of the edge lines can be thick (clear) or thin (unclear).<br />
(3) The size of the main batik ornaments could be small (producing fine texturous images),<br />
medium or large (producing coarse texturous images). From the result of experiments in<br />
detecting batik image edges using Canny methods (see section Experiment), it is found that: (1)<br />
The images having batik ornaments of large size and high contrast with their background<br />
produce clear edges and easily recognizable shapes. However, sometimes, the ones of low<br />
2
contrast produce unrecognizable shapes. (2) Both images of high and low contrast having small<br />
size of ornaments produce complex edges as they are “contaminated” by isen-isen edges, and the<br />
shapes could not be recognized. (3) Semen and lung-lungan ornaments, most of the time, are<br />
hard to detect as they merge with other crowded ornaments or isen-isen.<br />
Figure 1. Examples of batik motifs.<br />
Considering these facts, it is concluded that classical batik images can not be classified using the<br />
shapes or the textures alone. Therefore, the classification system utilizing ornaments shape and<br />
image textures is proposed (see Figure 2). During off-line stage, first, the training images are<br />
preprocessed. Secondly, texture and color features are extracted from the images and stored. On<br />
on-line mode, the new image being classified is preprocessed, and the features are generated.<br />
The features are then compared to each pair of features stored id database, which generated a set<br />
of similarity values between the new image and the training images. Using the similarity values,<br />
backpropagation neural networks and k-nearest neighbor classifier then determines the class of<br />
the new image.<br />
3
training<br />
images<br />
off-line<br />
online<br />
new<br />
image<br />
image<br />
preprocessing<br />
image<br />
preprocessing<br />
texture and<br />
shape features<br />
generation<br />
texture and<br />
shape features<br />
generation<br />
Figure 2. A schematic of classical batik images classification system.<br />
Images Preprocessing. The pre-processing steps are: cropping the images to find the part of the<br />
images that are meaningful (in the experiment, the cropped size is 128 x 128 pixels), converting<br />
them to gray-scale images.<br />
Texture Features Generation. Based on experiments, (Randen, Husoy 1999) concludes that there<br />
is no superior method for texture classification. Some methods may be good for certain images,<br />
but inappropriate for other images, with respect to the classification error. In this study, two<br />
methods would be implemented, which are discrete wavelet transform (DWT) and discrete<br />
cosine transformed (DCT) based. For each method, two approaches would be implemented:<br />
content-based and region-content-based. Content-based steps: (1) 2-level DWT (or DCT) is<br />
applied to an image. (2) Statistical measures (mean and variance) are computed from the<br />
coefficient resulted from Step 1 and stored as the image feature. Region-content-based steps: (1)<br />
Each image is segmented into windows (which could be overlapping). (2) 2-level DWT (or<br />
DCT) is applied to each window and the coefficients are normalized. (3) The result of Step 2 are<br />
clustered using k-Means algorithm. (4) Mean and variance of each cluster are computed and<br />
stored as the feature. These methods are the modification version of the techniques employed in<br />
(Wang, et.all, 1997), (Bartolini., 2001), (Feng, Jiang, 2002) and (Singh, 2003). As most images<br />
are stored as compressed form of JPEG format, the advantage of using DCT is that the features<br />
can be directly generated from the compressed form (without decompressing the images first),<br />
which reduces the computation time.<br />
Shape Feature Generation. As shown on Figure 1, batik motifs, which are used to determine the<br />
batik class, are “hidden” among isen-isen. Therefore, making sure that motif shapes could be<br />
obtained is important. Here, the intensity of images is adjusted so that the motif shapes are clear.<br />
Next, to generate shape features, three methods are proposed: enhanced Fourier descriptor<br />
(Zhang, Lu, 2002), moment invariants (Lu, 1999) and elastic template matching (Hirata, Kato,<br />
4<br />
image features<br />
and classes<br />
classification<br />
image<br />
class
1992). Fourier descriptor methods: (1) The image is presented to Canny edge detector. (2) The<br />
centroid of the edge points is computed. (3) Compute the distance of each sample edge point to<br />
the centroid. (4) Apply Discrete Fourier Transform to the result of step 3. (5) Normalize the<br />
coefficients of step 4 by dividing each coefficient (Fi) with the first coefficient (F0) and store<br />
them as the features. Moments invariant method: Three order moments are computed from the<br />
preprocessed images and the result are stored as the feature. Elastic template matching methods:<br />
(1) The image is presented to Canny edge detector. (2) The output of step 1 (an array containing<br />
1s and 0s) is stored as the feature.<br />
Classification using k-Nearest Neighbor. The basic idea of the classification process is adopted<br />
from (Sheikholestami et.all, 1998) with some modification. The classification process consists of<br />
four main steps: (1) Compute the new image shape and texture features and the similarity values<br />
between the new image and all training images using shape and texture features. Find two sets of<br />
training images that are most similar to the new image in terms of the ornaments shape and the<br />
image texture. (2) Combine the two sets resulting in step 1. Let Rq be the new set. (3) Compute<br />
the overall image similarities of images in Rq using multi-layer back-propagation neural network.<br />
(4) Sort the new similarity values obtained from step (3), and using k-nearest neighbor<br />
classification technique, determine the class of the new image.<br />
Computing image similarities. Texture feature. For content-based, the distance between 2<br />
images is computed using Euclidean distance. Then the distance is transformed into similarity<br />
value as follows:<br />
SimValue(i,j) = 1 – distance(i,j) / max of Distance (1)<br />
where i,j denoting the index of the two images being compared and Distance is a set of all<br />
distance between images. For region-content-based, the method in (Bartolini, 2001) is applied.<br />
Shape feature. The main steps are: (1) The new image is segmented into windows and features<br />
are generated from each window. (2) The feature of a training image is compared to the feature<br />
of each new image windows. (3) For moments invariant and Fourier descriptor, the similarity<br />
value is computed using Eq. 1. For elastic template matching: similarity is computed by<br />
determining the correlation between the two features. The largest value among all similarity<br />
values of the windows is selected as the similarity value between the new image and training<br />
image.<br />
5
Training the back-propagation neural networks. To train the neural network (see Figure 3) and<br />
compute the proper weights, a set of images that are visually similar (positive examples) and a<br />
set of images that are not similar (negative examples) are provided. The input for the training is<br />
the similarity values of the images computed from texture and shape feature matching.<br />
x1<br />
x2<br />
input<br />
layer<br />
V21<br />
V11<br />
V22<br />
V12<br />
hidden<br />
layer<br />
Figure 3. Back-propagation neural networks.<br />
Experiment<br />
At this early stage of research, experiments have been conducted to find the proper technique of<br />
obtaining image edges and to prove visually that shapes and textures should be used in<br />
classifying images.<br />
By observing a sample of batik images, it is found that many of them have unsharp motif edges<br />
but sharp edges of isen-isen or other additional ornaments that have no meaning. Applying<br />
Canny edge detector to such images directly would generate edges that are inappropriate for<br />
classifying. Figure 4 shows banji batik edges where swastika shape, which is needed for<br />
classifying is hidden among other unnecessary ornaments.<br />
Figure 4. Banji batik edges shape without image enhacement.<br />
To deal with this problem, images are enhanced. First, the intensity of the shapes having low<br />
value of intensity is increased. In this experiment, intensity value of [0 0.5] is transformed to [0.5<br />
1]. Second, the image is sharpened by stretching intensity value to a certain range, in this<br />
experiment, it is [0, 1]. Canny detector is then applied to the enhanced images. Figure 5 shows<br />
some edges generated from images shown on Figure 1. It is shown on Figure 5.a, that swastika<br />
6<br />
y12<br />
y22<br />
output<br />
layer<br />
o
appears clearly. By enhancing the images and using a certain threshold value (in this experiment,<br />
it is 0.5) to Canny detector, isen-isen is sometime eliminated from the edges giving better<br />
shapes.<br />
a.banji b. ceplok c. lung-lungan d. semen<br />
Figure 5. Batik edges detected by Canny detector.<br />
It also is found that the output of Canny detector applied to batik images having fine motif is fine<br />
and dense edges (see Fig. 6). Applying the methods mentioned previously to generate shape<br />
features from these edges would potentially give bad or erroneous features. Generating texture<br />
feature from this kind of image is more appropriate.<br />
Figure 6. An example of Canny output having fine and dense edges.<br />
Conclusion<br />
Image preprocessing of classical batik images plays an important role in generating the<br />
appropriate features that could lead to high accuracy result of the classification. As there are<br />
many batik images containing large and small shapes of ornaments, generating feature for both,<br />
in the form of shape and texture feature, would be needed by the classification technique in order<br />
to increase the accuracy. Further work is needed to prove that the classification technique<br />
proposed performs well. The work would include implementing the system and conduct<br />
experiments, with the aim of observing the performance of the technique, using large number of<br />
images representing real world batik images.<br />
7
References<br />
Kerlogue, F., 2004. The Book of Batik. Archipelago Press. Singapore.<br />
Doellah, S., 2002. Batik: Pengaruh Jaman dan Lingkungan. Danar Hadi Solo. Indonesia.<br />
Hamzuri, 1981.Classical Batik. Penerbit Djambatan. Jakarta.<br />
van Roojen,P., 2001. Batik Design. The Pepin Press. Singapore.<br />
The Institute for Research and Development of Handicraft and Batik Industries, 1997. Handbook of Indonesian<br />
Batik. Lembaga Penelitian dan Pendidikan Industri, Dept. Perindustrian. Yogyakarta.<br />
Susanto, S.S.K., 1980. Seni Kerajinan Batik Indonesia. Balai Penelitian Batik dan Kerajinan, Lembaga Penelitian<br />
dan Pendidikan Industri, Dept. Perindustrian R.I. Yogyakarta<br />
Zhang, D.; Lu, G., 2002. Enhanced Generic Fourier Descriptors for Object-Based Image Retrieval. In: Proc. of the<br />
Intl. Conf. on Acoustics, Speech and Signal Proc (ICASSP), IEEE, Orlando, USA, May 2002.<br />
Prasad, B.G.; Gupta, S.K.; Biswas, K.K, 2001. Color and Shape Index for Region-Based Image Retrieval. In: Proc.<br />
Of IWVF4, LNCS 2059, pp. 716-725, Springer-Verlag Berlin Heidelberg, 2001.<br />
Lu, G., 1999. Multimedia Database Management Systems. Artech House, London.<br />
Wang, J.E.; Wiederhold, G.; Firschein,O.; Wei, S.X., 1997. Content-Based Image Indexing and Searching Using<br />
Daubechies’ Wavelets. International Journal of Digital Libraries. Springer-Verlag.<br />
Bartolini, I.; Ciaccia,P; Patella, M., 2001. Windsurf: Region-Based Image Retrieval Using Wavelets, DEIS-CSITE-<br />
CNR, Univ. of Bologna, Italy.<br />
Sheikholestami, G.; Chang, W.; Zhang, A., 1998. Semantic Clustering and Querying on Heterogeneous Features for<br />
Visual Data. ACM Multimeida ’98, Bristol, UK.<br />
Fauzi, M.; Lewis, P., 2002. Texture-based Image Retrieval Using Multiscale Sub-image Matching. Dept. of<br />
Electronics and Computer Science, Univ. of Southampton, UK.<br />
Bartolini, I., 2001. Efficient and Effective Similarity Search in Image Databases. Dissertation, Dip. Elet. Informatika<br />
Sis., Univ. Degli Studi, Bologna, Italy.<br />
Abbadeni, N., 2003. Content Representation and Similarity Matching for Texture-based Image Retrieval. In: Proc.<br />
of MIR’03, Berkeley, CA, USA, Nov. 7, 2003.<br />
Randen,R.; Husoy, J.H., 1999. Filtering for Texture Classification: A comparative Study. IEEE Trans. On Pattern<br />
Analysis and Machine Intelligent, Vol. 21, No. 4, April, 1999.<br />
Feng, G.; Jiang, J., 2002. JPEG Compressed Image Retrieval via Statistical Features. In: Pattern Recognition, Vol.<br />
36, pp. 977-985, Elsevier Science Ltd.<br />
Singh, P.K., 2003. Unsupervised Segmentation of Medical Image Using DCT Coefficients. In: Proc. Of Pan-Sydney<br />
Area Workshop on Visual Information Processing (VIP2003), Sydney.<br />
Hirata, K.; Kato, T., 1992. Query by Visual Example Content Based Image Retrieval. Lecture Notes on Computer<br />
Science. Advances in Database Technology- EDBT 92, Vol. 580.<br />
Zhang, D., Lu, G., 2002. Enhanced Generic Fourier Descriptor for Object-Based Image Retrieval. In: Proc. of Int.<br />
Conf. on Acoustic, Speech and Signal Proc. (ICASSP 2002), May 13-17, Florida.<br />
8