Department of Computer Science
Computer Generated Batik Patterns
Rizaldi Tri Yanuar
A dissertation submitted to the University of Bristol in accordance with the requirements of the degree of Master of Science in the Faculty of Engineering
September 2017 | CSMSC-17
Declaration: This dissertation is submitted to the University of Bristol in accordance with the requirements of the degree of Master of Science in the Faculty of Engineering. It has not been submitted for any other degree or diploma of any examining body. Except where specifically acknowledged, it is all the work of the Author.
Rizaldi Tri Yanuar, September 2017
Executive Summary Batik is a traditional textile product with unique repeating patterns that are known to be originated from Indonesia. It is widely known for the process of its creation that is achieved using traditional techniques and is made by hand. Several researchers have discovered that there are relations between Batik patterns and fractals and attempted to develop a program for generating Batik patterns. However, the research mentioned applied mathematical techniques to create new variation of batik patterns instead of adapting existing patterns. This project aims to recreate 2D computer-generated Batik patterns inspired by three existing Indonesian Batik patterns, namely Megamendung, Kawung, and Truntum, using ubiquitous methods in computer graphics, supported by OpenGL. The aim can be achieved by completing objectives, which are: developing an algorithm to create the patterns, implementing the algorithm by building a program, and evaluate the results by recreating the existing patterns and conducting evaluations on the resulting patterns. The results of the evaluations suggest that the patterns generated by the program embody the characteristics of real Batik patterns and being favoured by most of the people involved in the survey. This project’s main achievements and contributions include: • Developed algorithms to automatically generate three types of Batik patterns. • Utilised OpenGL as the main library for the program. • Implemented Bezier curve method as the base of the Batik patterns. • Conducted a research on people’s perspective regarding the quality of the automatically generated patterns, which shows that the majority of respondents were satisfied with the results.
Acknowledgements This project would not have been done without the support from other people. Firstly, I would like to thank my supervisor, Prof. Simon McIntosh-Smith, who has supported me with my idea and provided a lot of helpful information that helps me shaping this project into something less abstract. Secondly, I would like to thank all members of my family—my parents, my sisters and their families—and my friends for the emotional support they gave me via text messages and video calls. Thirdly, I would like to thank my scholarship provider, Indonesian Endowment Fund for Education (LPDP), for the chance that has been given to me. Without them I would not even be able to study in this university. Finally, I would like to thank all Indonesian people living or studying in Bristol and my flatmates for all the refreshments I need during my stay in the UK.
iv
Contents Executive Summary
iii
Acknowledgements
iv
1 Introduction 1.1 Background & Motivation . . 1.2 Aims & Objectives . . . . . . 1.3 Deliverables . . . . . . . . . . 1.4 Research Areas . . . . . . . . 1.5 Computational Requirements 1.6 Dissertation Structure . . . . 1.7 Chapter Summary . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
2 Contextual Background 2.1 Batik . . . . . . . . . . . . . . . . . 2.1.1 Batik Design and History . 2.1.2 Batik Megamendung . . . . 2.1.3 Batik Kawung . . . . . . . . 2.1.4 Batik Truntum . . . . . . . 2.1.5 Batik in Computer Graphics 2.2 Bezier Curve . . . . . . . . . . . . . 2.2.1 Related Works . . . . . . . 2.3 Fractals . . . . . . . . . . . . . . . 2.3.1 Iterated Function System . . 2.4 Chapter Summary . . . . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . . . . . .
3 Methodology 3.1 Implementation . . . . . . . . . . . . . . . . 3.1.1 Bezier Curve Implementation . . . . 3.1.2 Batik Megamendung Implementation 3.1.3 Batik Kawung Implementation . . . 3.1.4 Batik Truntum Implementation . . . 3.1.5 Colouring the Patterns . . . . . . . . 3.2 Evaluation Methods . . . . . . . . . . . . . v
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . .
. . . . . . .
. . . . . . .
1 1 2 2 3 3 3 4
. . . . . . . . . . .
5 5 5 6 6 6 7 8 10 10 11 11
. . . . . . .
13 13 13 14 19 20 21 23
Contents
vi
3.3
24
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Results and Analysis 4.1 General Results and Analysis . . . . . . . . . . . . 4.1.1 Results and Analysis for Individual Pattern 4.1.2 General Results Conclusion . . . . . . . . . 4.2 Pattern Recreation Results and Analysis . . . . . . 4.2.1 Results and Analysis for Individual Pattern 4.2.2 Pattern Recreation Conclusion . . . . . . . . 4.3 Questionnaire Results and Analysis . . . . . . . . . 4.3.1 Results and Analysis for Individual Pattern 4.3.2 Questionnaire Conclusion . . . . . . . . . . 4.4 Image Classification and Object Detection . . . . . 4.4.1 Results and Analysis for Individual Pattern 4.4.2 Object Detection Conclusion . . . . . . . . . 4.5 Image Comparison . . . . . . . . . . . . . . . . . . 4.5.1 Results and Analysis for Individual Pattern 4.5.2 Image Comparison Conclusion . . . . . . . . 4.6 3D Cloth Simulation . . . . . . . . . . . . . . . . . 4.6.1 Cloth Simulation for Individual Pattern . . . 4.6.2 Cloth Simulation Conclusion . . . . . . . . . 4.7 Running Time Analysis . . . . . . . . . . . . . . . . 4.7.1 Results and Analysis for Individual Pattern 4.7.2 Running Time Conclusion . . . . . . . . . . 4.8 Chapter Summary . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
25 25 26 28 28 29 31 32 32 36 36 36 38 38 38 40 40 41 42 45 45 48 48
5 Project Conclusion 5.1 Evaluation and Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Benefits and Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49 49 50
A Survey Questions
53
B Object Detection Results
57
Bibliography
61
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
Chapter 1 Introduction This section introduces the project including the background and motivation, project’s aims and objectives, deliverables, research areas and required programs, tools and libraries.
1.1
Background & Motivation
Batik is one of the most popular clothing product in the world that is mostly known to be originated from Indonesia. It is worn by everyone, from young to old, and in any occasions, from daily routines to traditional rituals. The creation of handmade Batik garments is not easyit requires drawing the designs on a fabric using hot wax, soaking the cloth in a coloured paint, and repeating the steps until the desired results come out. There are numerous types of Batik pattern designs spread throughout Indonesia which are influenced by many other nations unique heritage, such as Arabic calligraphy and Chinese patterns. It is also considered as a UNESCO intangible cultural heritage [1]. Figure 1.1 shows an example of a Batik pattern called Megamendung. In computer science, especially in computer graphics field, Batik has rarely become a subject of a research. The research are ranging from simulating the cracks found on Batik cloths [3] to
Figure 1.1: Example of Batik Megamendung [2]
1
Introduction
2
creating a completely new Batik patterns using fractals [4]. However, none of those research has attempted to recreate existing Batik patterns or create patterns inspired by real Batik patterns, which is why this project’s main objective is to develop a program to automatically and digitally regenerate existing Batik patterns. Additionally, in order to put a focus on this project, three types of Batik pattern will be used: Megamendung, which has cloud-like shapes, Kawung, which has arrangements of leaf-like shapes, and Truntum, which looks like a field of flowers. Computer graphics is an interesting field to explore, especially pattern generation, since they need not only mathematics and analytical skills, but also creativity. Examples of several research involving pattern generation are repeating hyperbolic patterns [5], drawing floral patterns [6], and turning a simple line drawing into adapting another drawing style [7]. However, there are only a little number of research in computer graphics involving cultural values and this project is one way to improve that. Batik is one of Indonesias most valuable treasure, and hopefully this project will inspire other researchers, artists, and cultural experts to find a new way to preserve any cultural heritage. In the future, this project is expected to contribute in computer graphics and animation industry, especially in Indonesia, by providing more local texture options to apply to their models and designs. Hopefully people would be able to create digital Batik patterns for their own use without having to use image editing software.
1.2
Aims & Objectives
This project aims to develop a program implementing algorithms to automatically generate 2D images of chosen Indonesian Batik patterns. This will require an input from the user, such as the size of the pattern. To achieve this, the following objectives must be satisfied: 1. Conducting a research regarding the creation of Batik patterns, the meaning behind the patterns, and mathematical elements in the patterns. 2. Developing an algorithm to generate the patterns. 3. Building a program which implements the algorithm. 4. Evaluating the results of the program.
1.3
Deliverables
The deliverables of this project are: • An algorithm for generating singular element for the patterns. • An algorithm for producing a full pattern for each type of pattern.
Introduction
3
• A program which implements the algorithm and automatically generates patterns. • Resulting images of the automatically generated patterns. • An evaluation and conclusion of this project.
1.4
Research Areas
This project involved research and development in the following areas: 1. Current methods and tools related to computer graphics, especially in pattern generation. 2. The design of Megamendung, Kawung, and Truntum Batik patterns and how mathematical theories apply to them.
1.5
Computational Requirements
This project required writing a program in C++ with OpenGL and GLM graphical libraries. Additionally, the program was written using Microsoft Visual Studio 2017 Community Edition. The generated patterns will be presented in an image with the size of 512x512 pixels. In addition, Adobe Photoshop will be used during the planning stage and MATLAB will be used for evaluation stage.
1.6
Dissertation Structure
This dissertation will be divided into 5 chapters as outlined below: 1. Introduction — this chapter introduces the background, goals and requirements of the project. 2. Contextual Background — this chapter describes the basic theory and information of methods which will be used in the project. 3. Methodology — this chapter explains how the theories described in Chapter 2 will be implemented in order to achieve the project’s goals. 4. Results and Analysis — this chapter explains the results and analysis of the project’s evaluation. 5. Conclusion — this chapter provides evaluation and conclusion of the project, along with list of possible improvements of the project.
Introduction
1.7
4
Chapter Summary
To conclude, this chapter explained the why, what and how of this project will be carried out. This project will attempt to utilise the ubiquitous methods in computer graphics in order to develop an algorithm to generate Batik patterns by existing examples. Three varieties of patterns were chosen as the focus of this project. The results will be evaluated in order to determine the success of this project. Additionally, the structure of the dissertation were explained in this chapter.
Chapter 2 Contextual Background This chapter explains about the background theories underlying the project. This includes an explanation about Batik patterns and their brief history, Bezier curve theory and fractals.
2.1
Batik
This section explains the basic knowledge of Batik, the types of pattern used in this project and its connection to computer graphics.
2.1.1
Batik Design and History
As explained by Kerlogue [8], ’Batik’ is a term usually used to describe a cloth that has been decorated using wax-resisting technique. This is a technique done by hand, where a pattern is drawn in a piece of cloth using hot wax, then the cloth is submerged into a coloured dye. The waxed part of the cloth will not take up the dye, resulting a pattern that was left uncoloured by the wax. The process could be repeated for many times, eventually creating a complex pattern in various colours. The wax-resisting method has been practised for a long time in many countries and the traces of the technique have been found in China and Japan, dating back to the eighth century. Nowadays, the most famous Batik patterns are commonly originated from Indonesia. This project attempted to computationally generate 2D texture image of existing Batik patterns, namely Megamendung, Kawung, and Truntum. The three patterns were chosen due to their similarity of having curved elements in their shapes. The following subsections will explain the design of each patterns.
5
Contextual Background
2.1.2
6
Batik Megamendung
Examples of Megamendung pattern can be seen in Figure 1.1 and Figure 2.1. As can be seen from the example, this pattern is well known for its resemblance to clouds. While the pattern itself was derived from Chinese iconography, it is actually originated from the city of Cirebon, West Java, Indonesia. The pattern consists of repeated curve bands of different shades of one colour, usually blue. [8] In this project, two types of cloud motifs were used as a guide for recreating the pattern. The details will be explained in the following chapter.
Figure 2.1: Batik Megamendung [8]
2.1.3
Batik Kawung
The Kawung motif, which example can be seen in Figure 2.2, was described by some as resembling the fruit of the sugar plum tree. The pattern has also been said to ”symbolise the hope that the wearer will be as useful to the community as the kawung palm.” Additionally, at one time, this pattern was used exclusively by members of the royal household in the Mataram court of Central Java [8]. This project will refer to the ”sugar plum fruit” shape as a ”leaf”. In this project, the motif will be recreated by drawing a singular leaf diagonally, starting from the middle of the image to the top right corner, then duplicate the leaf three times, rotating 90 degrees clockwise each time. It will create a tile of Kawung motif which will be scaled and duplicated until it fills the image. The details will be explained in the following chapter.
2.1.4
Batik Truntum
This particular pattern is commonly used in Central Java by the parents of a bride and groom at a wedding. Many believed that the word ”truntum” means ”budding”, ”to guide”, or ”to
Contextual Background
7
Figure 2.2: Batik Kawung [9]
lead” [8]. The pattern itself, which can be seen in Figure 2.3, resembles a field of flowers or, in some cases, a sky full of stars. In this project, this pattern will be recreated in a similar way to Kawung. Instead of duplicating the ”leaf” four times, it will be duplicated eight times with 45 degrees rotation each, and a circle will be drawn in the centre of the tile. The details will be explained in the following chapter.
Figure 2.3: Batik Truntum [10]
2.1.5
Batik in Computer Graphics
Throughout the years, researchers have done various research involving Batik patterns. In authentic Batik patterns, there is a unique feature called the ”cracks” which were created as a result of the wax cracking during the dyeing process. Wyvill et al. [3] and Lv et al. [11] developed an algorithm to simulate the cracks. In 2008, Situngkir pointed out that iterated function systems (IFS) plays a part in several Batik patterns [12] and that Batik designs can be generated using random image tessellation and Thue-Morse tiling algorithms [13]. In 2009,
Contextual Background
8
Situngkir and Khanafiah developed a Batik motif generator by implementing collage theorem and fractal concepts [4]. However, most of the research attempted to generate a new type of Batik patterns instead of recreating the existing ones. There was a research conducted by Susanti [14] which developed an algorithm to generate an existing pattern from Palembang called Jumputan and Songket using iterated function systems and Julia set. The problem with the research was that the algorithm only produced individual element of the designs and users had to manually combine the elements using an image editing software such as Adobe Photoshop. This project will try to fix the problem by providing an automatically generated repeating Batik patterns without having to use another software.
2.2
Bezier Curve
As explained in [15], a curve is an infinitely large set of points having two neighbours except for the end point. There are three types of curves: 1. Implicit curve, which defines a point on a curve by testing if it is on the curve. A circle is an example of this curve. 2. Explicit curve, which represented by a function, such as y = f (x). 3. Parametric curve, which has a parametric form can not be represented by explicit and implicit functions. A 2D parametric curve usually has the form of P (t) = (x(t), y(t)) with x(t) and y(t) being the coordinates of any point on the curve and t is a number between the range of [a, b]. A curve which was generated under the control of other points is called a Bezier curve. Mathematically, a Bezier curve can be computed using Equation 2.1. n X
Pi Bin (t)
(2.1)
k=0
Where Pi and Bin (t) represent a set of points on a curve and the Bernstein polynomials respectively. Equation 2.2 shows the formula for Bernstein polynomials.
Bin (t)
n = (1 − t)n−i ti i
(2.2)
where n is the polynomial degree, i is the index, and t is the variable. A Bezier curve with two control points P0 and P1 creates a straight line (Figure 2.4, left) and is also called a simple Bezier curve. A Bezier curve made out of three control points is called
Contextual Background
9
Figure 2.4: Types of Bezier curves
a quadratic Bezier curve (Figure 2.4, middle), while the one with four control points is called a cubic Bezier curve (Figure 2.4, right). Linear interpolation can also be utilised to construct a Bezier curve. The control points are connected to create a base line, then a straight line slides along the base line to create an illusion of a curve called the ”envelope” of the set. This linear interpolation method can extend the construction to more than three points and two segments. Figure 2.5 illustrates the concept of a Bezier curve as a linear interpolation with three control points. [16]
Figure 2.5: Curve as an envelope of straight elements [16]
The following equations explain the creation of the curve segment in Figure 2.5. P01 (t) = (1 − t)P0 + tP1
(2.3)
P12 (t) = (1 − t)P1 + tP2
(2.4)
P (t) = (1 − t)P01 (t) + P12 (t) = (1 − t)2 P0 + 2t(1 − t)P1 + t2 P2
(2.5)
Equations 2.3 and 2.4 compute the segments between P0 − P1 and P1 − P2 respectively, with P01 and P12 represents the points on the two line segments. Finally, equation 2.5 computes the straight line segments connecting P01 and P02 , assuming the value of t is definite. The envelope is called a multilinear curve due to its construction of several straight segments. [16]
Contextual Background
2.2.1
10
Related Works
Curves have played a significant role in several research involving computer-generated patterns. Wong et al. [6] developed an algorithm to generate floral ornaments using a set of twodimensional curves. In 1999, Singh [17] conducted a research developing a curve designing tool by utilising digital French curves. In 2005, Ijiri et al. [18] applied curve as a part of three-dimensional flower modelling while maintaining its botanical structures. Hertzmann et al. [19] developed a method taking an example of a line or curve styles from user input and created new drawings that represents the input style. In the case of Bezier curve, Hanniel & Wein [20] discovered the first implementation of a complete Bezier curve arrangement of any degree. Hain [21] developed a method to generate a Bezier curve by stopping recursion earlier, resulting in reduced number of straight line segments, which led to a Bezier curve production with an average of 26% less vertices. The various research involving Bezier curve prove that it is one of the most researched curve and most likely to be the most developed, hence the method was chosen to become the key element in this project. The curve will be utilised as the base element for creating the patterns.
2.3
Fractals
As described in [22], a fractal is ”an object that displays self-similarity, in a somewhat technical sense, on all scales.” A fractal object owns the same type of structures that appears on all scale. A fractal is also called an endless pattern and commonly found in nature, such as trees, clouds, and mountains. Computationally, fractals can be generated by calculating an equation over and over. [23] One of the most well known example of fractals is the Sierpinski triangle or Sierpinski gasket. The construction of the triangle starts with a equilateral triangle, and an inverted triangle with half the side-length of the original is removed. This process is repeated infinitely until eventually it creates a pattern [24]. The Sierpinski gasket process is illustrated in Figure 2.6.
Figure 2.6: The Sierpinski gasket process [24]
Fractals play an important role in computer graphics. Several examples are the development of an algorithm for generating repeating hyperbolic patterns [5], a generative art called ”Fleen” implementing Kisrhombille tessellation method to create fractal-inspired patterns [25], and a research in building a realistic natural landscape model by implementing fractal methods [26]. Additionally, fractal method is also useful in other fields of research, such as summarising a text [27], using it as a dataset clustering algorithm [28], and simulating a network traffic [29]. The appearance of fractals in computer graphics and other computer science fields of research proves that it is one of the most versatile methods available.
Contextual Background
11
In a more project specific context, fractal elements have also been found in Batik patterns as proven by Hariadi et al. [30], who also developed a Batik pattern generator using the fractal methods. In this project, the fractal elements will also be found in the, specifically in the Megamendung pattern.
2.3.1
Iterated Function System
Iterated function system is an ubiquitous method in constructing fractals which is defined as a finite set of contraction mappings on a complete metric space [31] and has been used since at least 1985 [32]. Iterated function system, or IFS, can be represented symbolically by Equation 2.6, where fi is the contraction and X is the complete metric space. {fi : X → X|i = 1, 2, ..., N }, N ∈ N
(2.6)
IFS produces image by applying a set of affine transformations to an initial image, pattern, or shape. After that, the new image will be reproduced by the same affine transformation, generating a new image. The process occurs for many iterations until a new pattern is created. An example of a pattern with IFS is the Sierpinski gasket (Figure 2.6). The works involving IFS include visualisation of long genomic sequences [33] and simulation of three-dimensional plants [34], proving that IFS can be used in numerous computer graphics projects.
2.4
Chapter Summary
This chapter reviewed the basic information which are the most important part of the project and their related works. The information includes basic knowledge about Batik, including its history and the story behind the patterns used on this project, the basic theory of Bezier curve, and information regarding fractals and its properties. During the project’s execution, these information has been developed an adapted to meet the requirements of the project.
This page is intentionally left blank.
Chapter 3 Methodology This chapter provides the details regarding the implementation and evaluation methods carried out on the project. This includes the implementations of Bezier curve, how the patterns would be created, how the curve would factor into the patterns, and what kinds of evaluation would be counducted.
3.1
Implementation
Since there are three patterns used in this project, this section will be divided into four subsections, where the first three explains about the algorithms used for creating the key element for each pattern, while the fourth subsection describes the method used for creating a full pattern.
3.1.1
Bezier Curve Implementation
As an important part of the shapes, the Bezier curve must be defined in its own function. Based on the theory on Section 2.2 and adapted from [35], the equation for a quadratic Bezier curve is described in Equations 3.1, 3.2 and 3.3. X = a2 Ax + 2abBx + b2 Cx
(3.1)
Y = a2 Ay + 2abBy + b2 Cy
(3.2)
Z = a2 Az + 2abBz + b2 Cz
(3.3)
Where X, Y and Z are the points in the curve, (Ax, Ay, Az) is the start point, (Bx, By, Bz) is the mid-points, (Cx, Cy, Cz) is the end point, and a and b are the variables defined by the 13
Methodology
14
position of the point. The variables a and b are related to variable t in Equation 2.5, where initially a = t and b = 1 − a. Equations 3.1, 3.2 and 3.3 are utilised to determine only a point in the curve. Therefore, to calculate the entire curve, the equations will be done for every points in the curve. The value of a will decrease and the value of b will increase until both variables switch places. Algorithm 3.1 describes the creation process of a Bezier curve. The processes in Equations 3.1, 3.2 and 3.3 are referred to as getBezierPoints. Algorithm 3.1: Get Bezier curve points Result: Bezier Curve initialize nPoints; a = 1.0; b = 1.0 - a; for i = 0 to nPoints do getBezierPoints[i]; a = a - 1.0/nPoints; b = 1.0 - a; end The curve would have a pivotal role in creating the patterns, hence a function for generating the curve is written in order to simplify the creation of the curve.
3.1.2
Batik Megamendung Implementation
Since there are no rules in drawing the Megamendung pattern, this project will look into several examples of Batik pattern and choose a cloud element that would be suitable for being recreated. There are two types of cloud pattern chosen: the recursive cloud and the simple cloud. The examples will be studied in terms of how could the pattern be recreated with Bezier curves. The recursive cloud is the type of cloud pattern created by recursively drawing curves. Figure 3.1 shows the manual extraction process using an image editor. The original image on the left of the figure was taken from [36]. The single cloud element on the right will be used as the base.
Figure 3.1: Extracting a recursive cloud shape from a Megamendung pattern
Methodology
15
The wavy edges of the cloud pattern can be seen as it was made out of a set of continuous curves, which also inspired this project in using curves as the main element of the pattern. Algorithm 3.2 describes the above process in details. The startP oint[0] will be automatically set by the algorithm, along with the endP oint[0] and midP oint[0]. nIterations, or the number of iterations, will be set randomly at the start of the algorithm. Then, depends on the number of iterations, the algorithm will compute the Bezier algorithm. getbezierCurve[n] will implement the function explained in Algorithm 3.1. When the computation gets to the final iteration, the curve will be cut in half to close the cloud shape. Algorithm 3.2: Draw cloud base Result: Basic shape for a cloud element set startPoint[0]; set nIterations; for n = 0 to nIterations do get EndPoint[n]; get MidPoint[n]; get bezierCurve[n]; draw bezierCurve[n]; if n == nIterations then cut the final curve in half; else set startPoint[n+1] = endPoint[n]; end end Figure 3.2 roughly illustrates the construction of the base of the cloud pattern. Points A through K are the control points of the quadratic Bezier curves with the end point of each curves become the start point of the next curve which forms four curves: AC, CE, EG, and GI. The drawing will start from point A and ends at I. The ornamental spirals inside and outside of the curve will be an extension connected to point A in curve AC and point I in curve GI respectively. The size of each curve will gradually increase depends on how many iterations, which depends on the size of the cloud, hence making the cloud pattern possessing a fractal and iteration function system elements. The next step is transforming the base curve into a wavy line. To achieve this, the base curve will be divided into several parts having two points which will be the new control points, i.e. start point and end point, of the new smaller curves. Then, each pair of points will be given a new control points, called mid-points, which is right in the middle of the two points and several pixels outward or inward the curve, depending on their position. Hence, for every three control points, there will be a new, smaller curve. Algorithm 3.3 describes the process of creating the smaller curves throughout the base curve. It starts with initialising the number of small curves for each iteration as nDivisions. Then, based on the number of divisions, it will compute the new control points for each small curve,
Methodology
16
Figure 3.2: Base curve of type 1 cloud pattern
and start calculating the points for the curve. At the end of an iteration, the nDivisions will be increased by 2 to add more little curves for the next longer iteration. Algorithm 3.3: Draw wavy edges Result: Final cloud pattern initialize nDivisions; for i = 0 to nIterations do for j = 0 to nDivisions do get startPoint[i][j]; get endPoint[i][j]; get midPoint[i][j]; get bezierCurve[i][j]; nDivisions = nDivisions + 2; end end Figure 3.3 provides an illustration for this process. Points A, C, E, G, I, and K are control points from the base curve, while points B, D, F , H, and J are the mid-points of each curve. The output of this process will be curves AC, CE, EG, GI, and IK. The wavy edges will be generated along the base curve and the final output will become a single cloud pattern. The second type of the cloud pattern, unlike the recursive cloud, will have a fixed number iteration. Figure 3.4 illustrates the manual extraction process from the source image taken from [37] and the base pattern on the right. Applying the same method for the recursive cloud, the next step is to manually draw curves to the simple cloud pattern. Figure 3.5 roughly illustrates the base curve for type 2 cloud pattern. This pattern has seven iterations of base curve which starts at the spiral on the left side and ends at the spiral on the right side. In this project, this particular pattern will be made symmetrical, which in some ways also possess a self-similarity characteristic of a fractal.
Methodology
17
Figure 3.3: Creating a wavy edge
Figure 3.4: Extracting a simple cloud shape from a Megamendung pattern
Lastly, the method as depicted in Figure 3.3 will also be applied to the type 2 cloud base curve to produce the final type 2 cloud pattern.
Figure 3.5: Base curve of type 2 cloud pattern
Figure 3.6 shows the final result of the type 1 cloud with 4 iterations (left) and type 2 cloud pattern (right). The resulting elements are then arranged in randomised position and size using an algorithm that will not put more than one cloud in the exact same position. However, there are probabilities where several clouds are located very close to each other that they might overlap,
Methodology
18
Figure 3.6: Results of Type 1 and Type 2 cloud patterns
but it would create an illusion resulting in a Megamendung pattern which looks similar to the original pattern. The clouds will be drawn starting from the top left corner of the image. To make sure the cloud would not be in the same position, a method inspired by bounding box is used in the algorithm. Points for each four corner of the cloud algorithm will be computed. Since the starting point is the top left corner, the drawing process will go to the bottom right direction. Then, the next clouds’ position will be calculated by randomising a position then adding the value of the bottom right corner of the bounding box. This process goes on for the number of density defined manually. Additionally, each cloud shapes will be given a random scale in order to create clouds with various sizes. To make sure that each cloud will not be oversized or undersized, a maximum size is set based on the density. Equation 3.4 is implemented to determine the maximum size of a cloud shape, which indicates that the maximum size is inversely proportional to density value. Algorithm 3.4 reviews the entire tiling process. maxSize = 80/density Algorithm 3.4: Tiling the cloud patterns Result: Final Megamendung pattern set density; set maxPosition[0] = topLeftCoordinate; for i = 0 to density do get maxPosition[i]; get randomPosition; cloudPosition = randomPosition + maxPosition[i]; set randomScale; get maxPosition[i+1]; end
(3.4)
Methodology
3.1.3
19
Batik Kawung Implementation
The Kawung pattern will be referred to as the ”leaves” pattern, hence a single element of this pattern will be called a ”leaf”. The pattern itself consists of numerous leaf pattern placed diagonally with alternating direction for each leaf. This pattern can be broken down into a single tile with four leaves that can be drawn repetitively until it fills the canvas and, as you can see in Figure 3.7, the leaves can be generated using curves. The original image on the left was taken from [38].
Figure 3.7: Curve elements on a Kawung pattern
The drawing process starts with drawing a curve from the centre (A) to the top right point of the tile (B) with the curve facing upward to mid-point C, then draw another curve from top right (B) to the centre of the tile (A) with the curve facing downward to mid-point D. This process creates a single leaf, which is also represented in Figure 3.8.
Figure 3.8: Drawing a single leaf
In the next process, the leaf is duplicated three times, adding 90 degrees of clockwise rotation, pivoting around the centre point, each time. This process is illustrated in Figure 3.9a with the final result shown in Figure 3.9b. In addition of the proposed method, ornamental dots are added in the final pattern based on several Kawung patterns having the similar ornaments. Afterwards, the tile is duplicated, scaled, and translated according to the user input and, unlike the Megamendung pattern, Kawung’s leave tiles will be placed evenly and will not intersect with each other, hence there would be no need to set random position and scale.
Methodology
20
(a) Kawung drawing process
(b) Final result of a Kawung tile
Figure 3.9: Drawing a Kawung tile
3.1.4
Batik Truntum Implementation
As described in the previous chapter, the Truntum pattern resembles a field of flowers. Since this pattern is identical to Kawung in terms of neatness and equal distance between tiles, the similar drawing method will be used. Figure 3.10 illustrates the curve shapes on the Truntum pattern example taken from [39]. On the right hand side of the figure, it can be concluded that a Truntum pattern can be created by drawing a circle surrounded by eight petals with a line stretching from the end of the petals.
Figure 3.10: Curve elements on a Truntum pattern
The petals will be drawn similarly to the leaves from the Kawung pattern, since they have identical form. The initial petal’s start position will be moved according to the circle’s radius, and a straight line will be drawn from the top left corner of the petal. Finally, the petal will be duplicated eight times and adding 45 degrees of rotation around the centre point each. This process is illustrated in Figure 3.11. Finally, the flower patterns will be tiled to fill the canvas. However, as the example in Figure 3.10 shows, the flowers are alternating with several ornamental patterns in the form of a white circles and five dots. Hence, the tiling for Truntum is done similarly to the chessboard pattern, in which the black square and the white square will be replaced with a flower pattern and the ornamental dots respectively. Figure 3.12 shows the final render of a Truntum tile surrounded by ornamental dots and circles in the edges and a quarter part of other flower tiles as a result of overlapping positions.
Methodology
21
Figure 3.11: Drawing the flower pattern
Figure 3.12: Final result of a Truntum tile
3.1.5
Colouring the Patterns
Colour is an important part of Batik since it could give additional meaning to the patterns. For example, red, which is correlated with female principle, and white, which correlates to male principle, could be combined to symbolise fertility and prosperity. Red and white Batik cloths are usually worn by the bride and groom at a wedding ceremony in several parts of Java to symbolically confer the qualities for them. [8] In reality, Batik cloths are created by hand, hence the authenticity and natural look of the colours. For example, several Megamendung patterns have colour gradation on the edges of the clouds. However, this research is more focused on the creation of the patterns than the colour. Therefore, the colours will be simply divided into three parts: background colour, fill colour, and accent colour, and will be taken from the existing Batik patterns using online colour scheme extractor [40] and converting to a set of RGB colour with 0-1.0 range, as used in OpenGL, using a converter [41]. There are nine colour palettes used for this project, chosen from nine images, each three of them represents a pattern. These colours will be used in the evaluation stage in which the program will attempt to recreate the actual patterns. Table 3.1 provides the list of images from which the colours were taken, along with their sources and RGB colour values.
Methodology
22 Table 3.1: Original images
Image
Source Colour Batik Megamendung
[37]
Background: (0.84314, 0.75686, 0.09412) Fill: (0.03137, 0.21569, 0.45882) Accent: (0.50980, 0.61176, 0.74118)
[42]
Background: (0.07843, 0.09804, 0.10980) Fill: (0.16078, 0.50980, 0.43922) Accent: (0.85882, 0.93333, 0.97255)
[43]
Background: (0.25098, 0.36078, 0.61176) Fill: (0.16863, 0.17647, 0.29020) Accent: (0.83137, 0.85490, 0.91765)
Batik Kawung
[38]
Background: (0.05098, 0.04314, 0.05882) Fill: (0.65490, 0.27843, 0.17647) Accent: (0.92549, 0.92941, 0.94510)
[44]
Background: (0.07059, 0.12157, 0.17647) Fill: (0.95294, 0.87843, 0.72549) Accent: (0.34118, 0.07843, 0.00784)
Methodology
Image
23 Continuation of Table 3.1 Source Colour (R, G, B)
Background: (0.92941, 0.61961, 0.21961) Fill: (0.21176, 0.14902, 0.08627) Accent: (0.75686, 0.68627, 0.60000)
[45]
Batik Truntum
3.2
[39]
Background: (0.00000, 0.03137, 0.16078) Fill: (0.94902, 0.79608, 0.66667) Accent: (0.75294, 0.14118, 0.09020)
[46]
Background: (0.04314, 0.01961, 0.03529) Fill: (0.82745, 0.55686, 0.36078) Accent: (0.35294, 0.15294, 0.06667)
[47]
Background: (0.05882, 0.10588, 0.27059) Fill: (0.91765, 0.85098, 0.69412) Accent: (0.74510, 0.40000, 0.23529)
Evaluation Methods
To determine the success of this project, several types of evaluation will be conducted. These evaluations would give insights of the project’s achievements from different perspective. The evaluations are as follows:
Methodology
24
1. General evaluation — several patterns with different parameters will be generated in order to evaluate the general performance of the program. 2. Recreating existing patterns — one way to evaluate the results of the program is to recreate example patterns from actual Batik patterns. 3. Public survey — a questionnaire will be distributed to the public. The questionnaire involves giving a score regarding the quality of the recreated patterns and choose preference between the recreated images or the original. 4. Machine recognition — this evaluation will utilise Cascade Object Detection feature on MATLAB, in which several images of real Batik patterns will be used as training images and the detector will be tested on the recreated images. 5. Pixel-by-pixel comparison — the original and recreated images will be compared using an online tool utilising Resemble.js. Only Kawung and Truntum will be tested on this stage. 6. 3D cloth simulation — the recreated patterns will be applied to a 3D cloth simulation in Autodesk Maya to see how well they would perform in a real 3D environment. 7. Running time — using a function provided by OpenGL, this stage will analyse and compare running time required to create the patterns. The description of each evaluation will be explained on the next chapter along with their results and analysis.
3.3
Chapter Summary
This chapter reviewed the detailed process implemented on the project starting from drawing a Bezier curve, utilising the curve to draw the patterns with fractals method, and to draw the full patterns themselves. This chapter also reviewed the ways this project’s results will be evaluated, which provide various perspective of the project’s evaluation in order to determine the project’s success.
Chapter 4 Results and Analysis The main goal of this project is to develop an algorithm to automatically generate Batik patterns, and three patterns were chosen as the case study for this project. A program implementing the algorithm was also created. To evaluate the project, several hand-drawn Batik patterns will be recreated using the program, and the recreated patterns were evaluated further by asking the public’s opinion regarding the quality of the patterns, using an image classification algorithm to investigate whether the recreated pattern is recognised as the correct pattern, and applying the image to a cloth simulation to see how it performs in 3D environment. This chapter reviews the results of the algorithm and the evaluation of the project.
4.1
General Results and Analysis
This section reviews the patterns generated by the algorithms and subjective evaluations regarding the results. A console program has been created to generate the patterns by entering inputs. The program works as follows: 1. Choose a pattern — enter a number from patterns list, 2. Choose a colour palette — enter a number from palettes list, 3. Input parameters — enter the desired density (for Megamendung) or size (for Kawung and Truntum. Several test cases will be used in generating the patterns that will provide enough resources to be evaluated. The primary evaluation here is to test how the algorithm would perform with various conditions in general and whether the results have the characteristics of a Batik.
25
Results and Analysis
(a) Density = 10
26
(b) Density = 20
(c) Density = 30
Figure 4.1: Batik Megamendung Results
4.1.1
Results and Analysis for Individual Pattern
Megamendung Figure 4.1 shows Megamendung patterns generated by the algorithm. Three density values were used to examine the results in different conditions. Figure 4.1a shows the pattern with 10 density value, Figure 4.1b with 20 density value, and Figure 4.1c with 30 density value. As explained in the previous chapter, the size of each cloud is influenced by the density value, thus the clouds in Figure 4.1c are smaller than the clouds in Figure 4.1a. Aesthetically, the generated Megamendung patterns give impressions of actual Batik patterns. The cloud shapes, which were inspired by actual shapes found in actual Batik cloths, fill up the canvas in a way that the cloud shapes in actual Megamendung patterns do. The tiling process explained in previous chapter also managed to place some of the clouds in positions that slightly intersect with each other, which in some ways give more characteristics of the original pattern. However, while an overall analysis of the pattern gives positive impressions, there are also lack of characteristics of original Megamendung patterns. For example, in Figure 4.1c, plenty of spaces were left with no clouds, while most of the original patterns are filled with clouds. Another example is the variety of cloud shapes. This project only utilised two types of cloud shapes, which makes it less aesthetic than the original. Lastly, the colours in the recreated patterns are less lively than most the originals, since this project only utilise three colours while the original patterns have several gradating colours. In an overall manner, the algorithm for Megamendung patterns gave a considerably impressive results, despite the lack of authentic elements.
Kawung The results for Kawung patterns are shown in Figure 4.2. Three size values were applied to the patterns to examine the performance in different conditions, which are 4, 8 and 15, as shown in Figures 4.2a, 4.2b and 4.2c respectively. The size values implies the number of tiles
Results and Analysis
(a) Size = 4
27
(b) Size = 8
(c) Size = 15
Figure 4.2: Batik Kawung Results
for each x and y direction of the pattern, hence the size 4 pattern would have 4x4 tiles, size 8 pattern would have 8x8 tiles, and so on. The creation process of this pattern is simpler than Megamendung and it has generated impressive results for this evaluation. As seen in the figures, the results embody the characteristics of actual Kawung patterns. However, Figure 4.2c seems to be struggling to create the pattern with a bigger size in small image resolutions, which makes it harder to see the resemblance of the original Kawung pattern. The bigger size might perform better in bigger resolutions. While the results seem to give impressive representation of the original pattern, they also came with several minor drawbacks. The original Kawung does not come with fixed elements portrayed in the generated patterns, e.g. the dots inside the leaves, the square ornaments between the tiles, or the dots at the corner of the leaves. There are always variations in the original patterns due to the handmade creation process which the algorithm were unable to capture. This could be improved in the future by implementing algorithms such as the Batik cracks algorithm mentioned in the first chapter. Overall, the algorithm for Kawung patterns managed to create impressive results compared to the original patterns.
(a) Size = 4
(b) Size = 8 Figure 4.3: Batik Truntum Results
(c) Size = 15
Results and Analysis
28
Truntum Figure 4.3 shows the generated Truntum patterns with size values of 4 (Figure 4.3a), 8 (Figure 4.3b) and 15 (Figure 4.3c). The same size values for Kawung were applied to this pattern due to the similar tiling process, which could be used to compare the results between the two patterns. Since this pattern have alternating tiles of flowers and circle ornaments, the results are distinctive to Kawung patterns. In Figure 4.3a, only one flower tile is visible with size 4, surrounded by circle ornaments and a part of other flower tiles. In Figure 4.3c, the pattern is still visible with size 15 compared to Kawung pattern. This implies that the algorithm for Truntum produces better results with bigger size values than Kawung. The downside is that the generated Truntum patterns have a fixed distance between flower tiles, whereas the original pattern sometimes have different distance between tile in different pattern. The ornamental tiles are also fixed, which consists of one big circle surrounded by four small dots, while the original has various ornaments, as seen in Table 3.1. This could be influenced by the fact that they were handmade which, as stated above, provides uniqueness in each pattern. Conclusively, the Truntum pattern generator performed an impressive job by creating patterns that resemble the original patterns.
4.1.2
General Results Conclusion
This project aims to recreate Batik patterns using computer graphics techniques, which focuses more on generating the shapes. Based on the results above, the algorithms developed in this project have subjectively done a remarkable job by generating Batik patterns which shapes resembled the original patterns. The main flaw of this project is that it could not recreate the handmade quality of the authentic Batik cloths and, while it is an interesting addition to this project, it would be better to have another research conducted specifically in improving the authenticity of the generated patterns.
4.2
Pattern Recreation Results and Analysis
In this stage of evaluation, actual Batik patterns from images will be recreated using the program and algorithm developed in this project. The list of images to be recreated are provided in Table 3.1. Since the evaluation is to generate patterns that look similar to the original pattern and the algorithm has no ability to recognize the size or density values of the images by itself, the parameters have to be entered manually until the results resemble the original images as close as possible. The results shown in this chapter are the ones with the values of size and density that produced the patterns which closely resemble the original.
Results and Analysis
29
Tables 4.1, 4.2, and 4.3 on the next sections show the result of the algorithm. For comparison, the recreated patterns are shown side by side with the original image along with the corresponding density or size. The numbers provided on these tables will be used for reference to the patterns in future sections.
4.2.1
Results and Analysis for Individual Pattern
Megamendung Comparison for Megamendung pattern can be seen in Table 4.1. The most obvious thing that can be observed from the results is the difference between the cloud elements. The original patterns show a more natural and assorted cloud elements while the recreated patterns have limited type of patterns overlapping each other. This is due to the implementation of limited cloud shapes as explained in Section 3.1.2. Table 4.1: Results for Batik Megamendung
No.
M1
Batik Megamendung M2
M3
Original Patterns
Recreated Patterns
Density
20
15
25
In a few cases, the recreated patterns are indistinguishable at a glance. However, in a more detailed investigation, it shows that the original patterns clearly exhibit a richer and more natural looks, most likely due to its creation process. The colours also played a part in the quality of the results. Since the project only accommodates three colour elements (fill, accent, and background), the recreated patterns were unable inherit the colour gradation such as displayed in patterns M1 and M2. However, since there are no gradation displayed in original pattern M3, the program managed to recreate a very close representation of the original image, colour-wise.
Results and Analysis
30
Kawung Results Table 4.2 displays a side-by-side comparison between the original Kawung patterns and their corresponding recreated patterns. As the images show, the algorithm performed a quite satisfying job in recreating the Kawung patterns. The number of tiles are perfectly generated with their corresponding size, and the leaf shapes almost thoroughly resemble the original patterns. Nevertheless, there are some elements that could not be perfectly captured by the algorithm. Table 4.2: Results for Batik Kawung
No.
K1
Batik Kawung K2
K3
Original Patterns
Recreated Patterns
Size
5
2.5
4
The first thing that can be observed is the hand-drawn quality of the patterns. As the original images show, almost each line is unique and it gave the patterns a more natural and artistic look and feel. Several leaves possess a different line thickness, slightly skewed or rotated, and have a different size than the others. However, in the recreated patterns, the uniformity of the lines gave them a unique feature which is similarly aesthetically pleasing. The symmetrical shapes mean that it is suitable for creating a seamless, repeating pattern. Colour-wise, the results has also done the job almost perfectly, since there were barely any colour gradation in the original images. However, for the pattern K3, the colours inside the leaves were a mixture of white and brown, but the algorithm could only generate one colour for the leaf. This implies that the algorithm would be more applicable with single colours.
Truntum Results Table 4.3 shows the results of the Truntum pattern algorithm, compared side-by-side to the original images. These patterns were considerably more difficult to recreate, since the original
Results and Analysis
31
patterns have several unique random elements, such as several white spots appearing in the middle of some flowers in original image of T1. However, the algorithm in this project managed to produce a remarkably similar patterns to the originals. Table 4.3: Results for Batik Truntum
No.
T1
Batik Truntum T2
T3
Original Patterns
Recreated Patterns
Size
11
17
7.75
In pattern T1, although recreated image does not exhibit the random spots as seen in the original image, it did manage to generate a remarkable result of the pattern. In a way, it represents the stars in the sky as the Truntum pattern was described by some people. In contrast, pattern T2 seems to produce a better result than T1. It might be influenced by the smaller size of the flowers, hence making the recreated pattern look identical to the original. Pattern T3, however, seems to be the least similar of the three images. Firstly, it’s clearly due to the different shade of blue used as the background. Secondly, the yellow spots inside the flowers were bigger in the recreated pattern due to the algorithm. This implies that the colours and the size of the petals were two of the most essential parts in recreating a pattern.
4.2.2
Pattern Recreation Conclusion
Overall, the algorithm for generating the patterns managed to produce fairly good results, although it could not replicate the hand-drawn quality of the Batik cloths. The example patterns could also be recreated closely with a trial-and-error process, except for the Megamendung pattern due to the cloud shapes limitation. However, the algorithms were unable to produce the same hand-drawn quality which the actual Batik cloths exhibit. The main focus of this project is to develop algorithms to draw
Results and Analysis
32
the shapes, and judging by the results above, the algorithms have done a considerably good job.
4.3
Questionnaire Results and Analysis
As a part of a culture, the quality of a Batik design could not always be measured computationally. Therefore, in order to determine how well the algorithms perform, people’s assessment of the results are required. A questionnaire has been conducted in order to obtain feedback from the public. In the questionnaire, each generated pattern was displayed alongside the original image, and respondents were asked to rate the generated pattern on a scale of 1 (very bad) to 10 (very good) based on how well the recreated patterns imitate the originals and to choose whether they prefer the original or recreated patterns. The survey questions are provided in Appendix A. There were also additional questions asking respondent’s age and gender for demographic purposes. 35 people have taken the questionnaire, consisting of 24 female and 11 male respondents, with most of the population (13 people) aged between 21-25 years old. The results are as follows.
4.3.1
Results and Analysis for Individual Pattern
Megamendung The scoring results for Megamendung pattern are provided in Figure 4.4 with average score of 6.40, 6.45 and 7.46 for Patterns M1, M2 and M3 respectively, and overall average score of 6.78. Meanwhile, Figure 4.5 shows the number of respondents choosing whether they prefer the original or the recreated patterns. From Figure 4.5, it can be concluded that the original patterns of Megamendung were preferred by most of the respondents with a wide margin. Pattern M1 has the widest margin with only 4 out of 35 people decided that the recreated pattern was better. In contrast, Pattern M3 performed better with 9 respondents preferred the recreated pattern over the original. This aligns with the fact that Pattern M3 achieved the highest average score of 7.46, which is the highest of the three. In addition, it is highly possible that the results were affected by the fact that the colours of recreated Pattern M3 look similar to the original due to the lack of colour gradation. Overall, based on the score and preferences, the algorithm for generating Megamendung patterns did not perform as well as its original, hand-drawn counterpart.
Results and Analysis
33
Number of voters
10 8 6 4 2 0 1
2
3
4
5
6
7
8
9
10
Score Pattern M1
Pattern M2
Pattern M3
Figure 4.4: Megamendung Score Distribution
Number of voters
30
20
10
0 1
2 Score Original
3
Recreated
Figure 4.5: Megamendung Preference
Kawung Figure 4.6 presents the graph containing the score given by respondents and Figure 4.7 shows the respondents’ preference of the patterns. The average score for patterns K1, K2 and K3 are 7.94, 7.66 and 6.94 respectively, with an overall average score of 7.51. Based on the results shown in Figure 4.7, the algorithm for Kawung pattern seems to perform better than Megamendung. Pattern K1 conclusively performed the best of all three patterns, with 28 respondents preferred the recreated patterns to the original. Pattern K2 also managed to achieve better score for its recreated pattern with 23 votes out of 35. However, the original Pattern K3 won over the recreated pattern with a very narrow margin of only 1 vote. This also correlates to the score, in which Pattern K3 received the lowest score and K1 the highest.
Results and Analysis
34
Number of voters
12 10 8 6 4 2 0 1
2
3
4
5
6
7
8
9
10
Score Pattern K1
Pattern K2
Pattern K3
Figure 4.6: Kawung Score Distribution
Number of voters
25 20 15 10 5 0 1
2 Score Original
3
Recreated
Figure 4.7: Kawung Preference
Conclusively, the algorithms for Kawung pattern produced considerably better results than the original pattern, with two out of three recreated patterns were preferred by respondents.
Truntum Figure 4.8 shows the data of the score given by respondents, while Figure 4.9 shows the respondents’ preference of the patterns. The average score for Patterns T1, T2 and T3 are 7.86, 8.03 and 8.06 respectively, with a collective average of 7.98. Based on the results in Figure 4.9, it can be deduced that the algorithms for Truntum pattern generation subjectively produced better results than the original patterns. The number of
Results and Analysis
35
12 Number of voters
10 8 6 4 2 0 1
2
3
4
5
6
7
8
9
10
Score Pattern T1
Pattern T2
Pattern T3
Figure 4.8: Truntum Score Distribution
respondents voting for the recreated patterns were only slightly different between the three patterns, with Pattern T2 having the highest vote of 28 respondents. However, this results did not align with the score given to the patterns. According to Figure 4.8, the average score for T2 was slightly lower than T3.
Number of voters
25 20 15 10 5 0 1
2 Score Original
3
Recreated
Figure 4.9: Truntum Preference
Overall, the results show that respondents preferred the recreated patterns were better than the original, implying that the algorithm produced remarkable results.
Results and Analysis
4.3.2
36
Questionnaire Conclusion
This evaluation was conducted in order to receive feedback from the public regarding the performance of the algorithms developed in this project. Although the results showed a mixed response from the respondents, it can be concluded that the algorithms performed a considerably good job, especially for Kawung and Truntum pattern since most of the respective recreated patterns were preferred by respondents (Patterns K1, K2, T1, T2 and T3). However, the Megamendung algorithm seems to perform not as well as the other two, since it received the lowest preference votes. The most possible reason for this is because it lacks the ability to recreate the hand-drawn quality, hence losing its authenticity and natural looks, as previously described in Section 4.2.1.
4.4
Image Classification and Object Detection
While the previous experiment attempted to evaluate people’s perception regarding the recreated pattern by conducting a survey, this evaluation would determine whether the Batik elements are found in the generated patterns by utilizing Cascade Object Detector. The evaluation was conducted in MATLAB, using its Training Image Labeler app to specify ROIs on images [48] and its Cascade Object Detection functions to train classifiers using provided positive and negative images of Batik patterns [49]. Table 4.4 provides the details of the amount of images used for the training, with a total of 24 images. This chapter reviews the subjective analysis of the object detection results, what it might imply and how the training images might influence the detection results. Table 4.4: Number of positive and negative training images
Pattern name Megamendung Kawung Truntum
4.4.1
Positive 11 7 6
Negative 13 17 18
Results and Analysis for Individual Pattern
Megamendung Patterns 11 images were used as positive training images for Megamendung pattern. Before the training, ROIs were placed on various cloud shapes to make sure that the classifier contains different shapes of cloud. Additionally, the cloud shapes cut by the edges of the images—or the cloud shapes that only appeared in half—were also selected as ROIs. There were a total of 43 ROIs selected from 9 different images.
Results and Analysis
37
Figure B.1 shows the results of object detection for patterns M1, M2 and M3. As shown by the images, the object detector managed to detect numerous Megamendung elements based on the training data. Unfortunately, most of them detected only small parts of the clouds, not an entire cloud, such as the spirals in the middle and the outer part of the clouds and several wavy edges. However, several detected objects managed to capture a better appearance of a cloud shape. For example, the medium-sized cloud shape in the middle of pattern M3 (Figure B.1c) and a smaller cloud shape in the left side of pattern M1 (Figure B.1a). This is considered the best example of a cloud shape found in the patterns. The results imply that the generated patterns contain only details of cloud shapes embodied by Batik Megamendung patterns, although a full single shape of cloud was not detected.
Kawung Patterns The ROIs for Kawung pattern were placed on a single tile consisting of four leaves with their additional ornaments. There were 5 ROIs selected from 5 different images—one tile for each image. Figure B.2 shows the results of object detection for Kawung patterns K1, K2 and K3. In Figure B.2a, it can be seen that pattern K1 had the most number of objects detected. In fact, the detector managed to detect almost all of the tiles in the pattern. However, instead of a complete tile, only the middle upper part of the leaves intersection were detected. Figure B.2b shows the result for pattern K2 which displaying less detected object than the first pattern. Like the first pattern, some of the detected objects on pattern K2 only consists a small portion of the upper part of a tile, while some other detected objects only contain an ornamental circle. On the third recreated pattern (Figure B.2c, the detector managed to capture two objects with a full single tile. One of them was moved slightly to the right and a little bit oversized. However, the detector still unable to find all of the tiles on the pattern. The results showed that detecting the Kawung elements on a recreated pattern could be more complicated than imagined. Even though the pattern consists of a single shape being repeated and occasionally rotated and the results look noticeably similar to the original pattern, they were unable to be recognised by machines yet. Additionally, based on the results, the classifier might perform better with smaller tiles or a bigger size value.
Truntum Patterns For this pattern, 8 ROIs were selected across 6 images to make sure that various types of flower tiles were included. The results are displayed in Figure B.3. Figure B.3a shows the detected objects in pattern T1. The results are pretty much similar to pattern K1, where the detector managed to detect almost all of the flower tiles, but only
Results and Analysis
38
a small part of them. In this pattern, only the bottom left part of the tiles were detected. Additionally, several ornamental circles were also detected. The second pattern (Figure B.3b) seemingly obtained a far better result. The detector managed to detect most of the flower tiles on the pattern with addition of several ornamental circles. The third pattern (Figure B.3c), however, only detected the fewest objects of all three, with only one of them managed to recognise a slightly offset flower tile. The object detection results for this pattern imply that the flower patterns were easier to be detected with smaller size with the classifier.
4.4.2
Object Detection Conclusion
Based on the results explained in previous sections, the recreated patterns conclusively embodied the elements of the original Batik pattern as proven using the Cascade Object Detection method, even though the detector was unable to detect the full form of each pattern’s key shape on most of the images. Additionally, the results might be affected by the limited amount and variety of the images used at the training stage.
4.5
Image Comparison
In order to determine the similarity between the original images with the recreated patterns, an image comparison experiment was conducted. The comparison was done by comparing the images pixel by pixel. However, only Kawung and Truntum patterns were evaluated using this method, since the original Megamendung patterns have obvious difference in shapes and elements with the recreated patterns, making it impossible to compare the Megamendung patterns. The Batik numbering used in this section refers to the numbers in Tables 4.2 and 4.3. This evaluation utilised Resemble.js, an image comparison tools built using HMTL5 and JavaScript which is available online and was developed by James Cryer and the Huddle development team [50]. The tool compared and analysed two images to figure out their differences represented in percentage, along with an image highlighting the pixels with different values in pink, called the ’diff’ image. There are four modes of comparison provided by Resemble.js: ignore nothing, ignore less, ignore colours and ignore anti-aliasing. Since this project is more focused on the pattern generation, only ignore colours and ignore anti-aliased modes were used.
4.5.1
Results and Analysis for Individual Pattern
Kawung Table 4.5 shows the comparison results of three Batik Kawung patterns. Ignoring the colours, pattern K1 received the lowest difference score of 44.64%, whereas K2 and K3 had 60.82% and
Results and Analysis
39
63.81% differences respectively. In ignore anti-aliasing mode, the lowest difference score was received by pattern K2 with 24.44%, while K1 received 25.16% and K3 received 36.25%. In addition, pattern K2 had to be flipped horizontally in order to match the form of the original pattern. Table 4.5: Comparison Results for Batik Kawung
Batik Kawung Options
K1
K2
K3
Ignore colours Difference
44.64%
60.82%
63.81%
Ignore antialiasing Difference Average
25.16% 34.90%
24.44% 42.63%
36.25% 50.03%
Based on the results, pattern K3 holds the largest amount of difference with an average of 50.03%. This result could be affected by the sketch-like patterns inside the leaves of the original pattern. In the ’diff’ images of K3, there are pink sketch-like highlights inside the leaves, proving that the sketches in the original pattern contribute to the high comparison result. As for patterns K1 and K2, it was hard to determine which one represents the originals better since both of the images visually similar to the originals. However, based on the comparison results, pattern K1 represents its original pattern better than pattern K2, with an average difference value of 34.90% and less pink highlight found on its ’diff’ images.
Truntum The comparison results for Truntum pattern are shown in Table 4.6. In ignore colours mode, T2 obtained the lowest difference value of 46.92%, while T1 had 72.51% difference and T3 received the largest difference score with a whopping 98.11%. With antialiasing ignored, the lowest difference score was obtained by pattern T2 with 19.67%, followed by T1 with 31.48% and T3 with 67.49%.
Results and Analysis
40
Pattern T3 surprisingly received a high difference score, contradicting the relatively positive results from the questionnaire. However, this result is acceptable because apparently, after a more detailed investigation, the pattern T3 created by the algorithm generated the flower patterns in almost entirely different positions from the original. Hence, with the colours ignored, the score reach over 90% which implies that almost everything is different, even though they were visually similar. A highly possible solution to this problem is to recreate the pattern with larger size value. Table 4.6: Comparison Results for Batik Truntum
Batik Truntum Options
T1
T2
T3
Ignore colours Difference
72.51%
46.92%
98.11%
Ignore antialiasing Difference Average
31.48% 52.99%
19.67% 33.23%
36.86% 67.49%
4.5.2
Image Comparison Conclusion
Based on the results above, it could be concluded that the recreated Kawung patterns produced more similar results than the Truntum patterns. Additionally, the results of this evaluation suggest that, while the algorithm have succeeded in recreating patterns which aesthetically fall into Batik category and were mostly considered better than the original by survey, it did not perform very well in generating an exact duplicate of an already existing Batik patterns.
4.6
3D Cloth Simulation
This section explains the results of the 3D cloth simulation of the Batik patterns using Autodesk Maya 2017. The result images from section 4.2 were applied as the texture of the
Results and Analysis
41
cloth simulation in Maya and the UV mapping settings were modified to inspect whether the patterns would be suitable for a repeating pattern. The UV settings modified were the repeat size and mirror. In addition, one image from each pattern will be used as the test case for each pattern in this evaluation. The aim of this evaluation is to investigate how the patterns created using the algorithm would work in 3D environment, specifically cloth, since the actual Batik is in cloth form, and whether the images are applicable for repeating pattern. This could be useful for future implementations of the pattern in 3D models, games, or animated movies.
4.6.1
Cloth Simulation for Individual Pattern
Megamendung Table 4.7 shows the results of Megamendung pattern cloth simulation. The first image shows the recreated image applied to the cloth with no modified settings. The pattern works well in cloth, although the cloud could not be clearly seen due to the size. The second and third image show the same pattern with 3x3 UV repeat size, meaning the image will be duplicated 3 times both in U and V direction. In the third image, additional U & V mirror settings were turned on, making several rows of images showing mirror images of themselves, making the entire pattern in the cloth resembles a seamless pattern. While the second image shows a decent result of a from afar, the seams still appear if observed in details. This is due to the asymmetrical pattern itself. In contrast, the third image shows a better result for a seamless pattern.
Kawung Table 4.8 shows the results for Kawung cloth simulation. The first image shows the cloth without any modification, while the second image shows the pattern being repeated 3x3 times. Unlike the Megamendung pattern, this pattern can be made into a seamless pattern easily without having to mirror the image, since the pattern itself is symmetrical.
Truntum Table 4.9 shows the results for Truntum cloth simulation. The first image shows the normal cloth without any change to the settings. The second and third images were applied 3x3 UV repeat size, and for the third image, the UV mirror is turned on. This pattern could be tricky. At first glance the pattern might look symmetrical and can be easily repeated as Kawung, but in some cases, it is in fact not symmetrical. The second image, for example, if observed in details, the seams can be seen in several places. Mirroring the UV might fix this, and as can be seen in the third image, the seams are now unseen, but several flower shapes might be shape differently than the others, affected by the mirror.
Results and Analysis
42 Table 4.7: Batik Megamendung Cloth Simulation
Batik Megamendung No.
4.6.2
Results
Settings
1
Normal
2
UV repeat size 3x3
3
UV repeat size 3x3, Mirror U & V
Cloth Simulation Conclusion
Conclusively, the recreated patterns managed to produce a pattern that could be applied to a 3D object, specifically a simulated cloth. The Kawung pattern flawlessly fill out the cloth even if it’s being repeated since the shapes are symmetrical and identical. As for Megamendung and Truntum, in some cases, the patterns need to be mirrored to create the impression of a seamless pattern. Overall, the images generated by the algorithm are ready to use in a 3D environment.
Results and Analysis
43
Table 4.8: Batik Kawung Cloth Simulation
Batik Kawung No.
Results
Settings
1
Normal
2
UV repeat size 3x3
Results and Analysis
44
Table 4.9: Batik Truntum Cloth Simulation
Batik Truntum No.
Results
Settings
1
Normal
2
UV repeat size 3x3
3
UV repeat size 3x3, Mirror U & V
Results and Analysis
4.7
45
Running Time Analysis
In order to determine the speed of the algorithm, running time evaluation was conducted. This evaluation utilized the glutGet(GLUT ELAPSED TIME) function to retrieve the time spent running the algorithm in milliseconds (ms) [51]. New test cases will be used for this evaluation, in which three patterns with various parameters will be generated and the elapsed time will be recorded. A set of values will be applied for all of the parameters (density for Megamendung and size for Kawung and Truntum). Each algorithm generated pattern with density and size of 3, 5, 8, 10, 13, 15, 18 and 20. The numbers 3 and 20 were chosen as the minimum and maximum parameters because the clarity of the patterns were displayed clearly between those range. Additionally, since the time taken to run a pattern could be varied, the patterns will be generated five times for each parameter, and the average time will be analysed.
4.7.1
Results and Analysis for Individual Pattern
Megamendung Table 4.10 shows the running times elapsed when generating Megamendung patterns. As the table shows, the all of the recorded running times exceed 200 ms, with 208 ms being the fastest (density 5, test 4) and 329 ms being the slowest (density 8, test 4). The average running time of each density is also shown on the table, with none of them is below 250 ms and a cumulative average of 262.9 ms. Table 4.10: Megamendung Running Time
Density 3 5 8 10 13 15 18 20
Test 1 Test 2 Test 3 Test 4 261 264 234 230 256 311 244 208 243 232 262 329 272 251 272 269 223 281 254 257 293 273 253 252 268 248 307 263 254 279 286 251 Cumulative Average
Test 5 267 238 254 258 294 254 277 293
Average 251.2 251.4 264 264.4 261.8 265 272.6 272.6 262.9
Figure 4.10 shows the line chart representation of the running time average per density. As the chart shows, the time slowly increases over the density. However, there is a slight decrease in the fifth point, which is the pattern with 13 density and 261.8 ms average, slightly lower than the previous density average (264.4 ms). Overall, the graph implies that the bigger the density, the longer time needed to create the patterns.
Results and Analysis
46 Megamendung
Running Time (ms)
300
250
Average of each density Cumulative average 200
3
5
10
15
20
Density Figure 4.10: Megamendung
Kawung Table 4.11 provides the running time elapsed for recreating the Kawung patterns with various sizes, along with the average time for each size and cumulative average. The fastest time recorded was 208 ms by the third test of pattern with size 5, while the slowest was 328 ms by the fifth test of pattern with size 20. Even though the longest time is obtained by the highest value of size, this could not imply that the larger the size will always take the longer time, since the data says otherwise. Table 4.11: Kawung Running Time
Size 3 5 8 10 13 15 18 20
Test 1 Test 2 Test 3 Test 4 212 277 241 231 248 236 208 284 226 266 237 249 234 259 224 226 288 239 263 251 296 255 249 266 266 271 300 299 279 284 297 289 Cumulative Average
Test 5 219 233 245 261 298 289 298 328
Average 236 241.8 244.6 240.8 267.8 271 286.8 295.4 260.5
In Figure 4.11, the average time for each size is plotted into a line graph to see how the time would progress along the increasing size. At the lowest size of 3, the running time average falls below 250 ms. However, the number takes a big leap at size 13, which keeps increasing gradually until it almost reaches the top. The average for the largest size also has larger difference with the cumulative average (34.9 ms) than the lowest size time average with the cumulative average (24.5 ms).
Results and Analysis
47 Kawung
Running Time (ms)
300
250
Average of each size Cumulative average 200
3
5
10
15
20
Size Figure 4.11: Kawung
Truntum Table 4.12 shows the running time of Truntum pattern generations, with average time for each size and their cumulative average. The shortest running time was obtained by the lowest size value with 187 ms, and the longest running time of 287 ms was required to generate the pattern with size 20, which is the largest size value. The fact that the shortest time and the longest time were obtained by the lowest and the highest values of size respectively, this could imply that, for this pattern, the time required to generate patterns would be equivalent with the size. Table 4.12: Truntum Running Time
Size 3 5 8 10 13 15 18 20
Test 1 Test 2 Test 3 Test 4 243 187 228 239 247 227 219 235 227 256 259 242 243 257 255 252 227 280 262 252 246 258 254 249 256 255 278 241 228 245 259 287 Cumulative Average
Test 5 247 230 231 245 228 238 221 265
Average 228.8 231.6 243 250.4 249.8 249 250.2 256.8 245
Figure 4.12 shows a graph plotting the average time of each size. The graph starts off with an average time below 250 ms and it increases until it hits somewhere around 250 ms in the middle. However, the number stays around 250 ms until it finally slightly increases at the end, finishing at slightly above 250 ms.
Results and Analysis
48 Truntum
Running Time (ms)
300 Average of each size Cumulative average
250
200
3
5
10
15
20
Size Figure 4.12: Truntum
4.7.2
Running Time Conclusion
Based on the results shown on previous sections, the Megamendung pattern were relatively the slowest to draw, with a total average of 262.9 ms. This result were most likely affected by the size of a single cloud pattern which were bigger compared to the size of a single tile of leaves in Kawung or flowers in Truntum. Another reason is the tiling process which generated the (x, y) positions and cloud size randomly for each cloud. The other two patterns did not require to randomise numbers, hence making the process slower for Megamendung. Meanwhile, Truntum was proven to perform the fastest. Lastly, the time required to generate a pattern is equivalent to the value of the parameters, even though there are slight decrease in the middle of the graphs. However, the algorithms managed to produce the patterns as expected and at a considerable speed with no meaningless lags or delays in practice.
4.8
Chapter Summary
This chapter reviewed the details of evaluations which have been conducted. The evaluations include generating patterns with various parameters, recreating actual patterns, carrying out a questionnaire, testing the recreated images using object detection method, comparing the results with actual patterns pixel-by-pixel, applying the generated patterns to 3D cloth simulation, and analysing the running time of creating each pattern. These results provide different points of view of the project’s achievement and will be concluded on the next chapter.
Chapter 5 Project Conclusion 5.1
Evaluation and Conclusions
The main objective of this project is to develop a program to automatically generate existing Indonesian Batik patterns by implementing ubiquitous method in computer graphics. The main background is because there have only been a very few research about Batik patterns, which, in author’s personal opinion, would have been a compelling research topic. Some of them implemented fractal algorithms to automatically generate Batik patterns, however they created a new type of pattern instead of duplicating an existing pattern. One research attempted to create an existing pattern using fractals, but another image editing software was required to stitch up the pattern. This project has developed a program which is capable of automatically generating a 512x512 image of a Batik pattern. Three Batik patterns can be created by the program, namely Megamendung, which has cloud-like shapes, Kawung, which has leaf-like shapes, and Truntum, which has flower- or stars-like tiles. The program was built on C++ using OpenGL library. Although it is a simple console program in which the user had to enter their choices manually, the program managed to produce aesthetically pleasing patterns which also resemble the original patterns. During the planning stage, it was figured out that the three patterns had one relation: they could all be created by modifying curves. Therefore, the Bezier curve method was chosen as the basic element of the patterns. In order to determine the success of this project, several tests have been conducted. The main idea was to duplicate existing patterns using the program and evaluate the results by running various experiments. Three distinct patterns for each pattern category were chosen as an example to be recreated using the program. However, since the program was unable to recognise the properties of the examples, the parameters, i.e. pattern category, colour palette and size, had to be entered manually until the generated patterns closely represent their respective examples. The first experiment was a questionnaire in which people could evaluate the results of the program, specifically the similarity between the recreated patterns and their examples. Based 49
Project Conclusion
50
on the results, the majority were satisfied with the results of Kawung and Truntum. However, Megamendung’s recreated patterns received the least positive reactions. The key reason could be because of the fixed number of cloud shape types and colours. Only two type of cloud shapes adapted in this project, while the original patterns have various cloud shapes that could make each of them unique, and the colouring approach in this project is more flat-based and different from the actual Batik. Those factors would clearly affect people’s perception regarding the quality of the patterns. The next evaluation was object detection to determine whether the recreated patterns embody the elements of Batik patterns. The results show that the Batik elements were detected on the recreated patterns. However, the detector was mostly unable to identify the key shapes of each pattern (cloud, leaves and flowers), which could be affected by the training images. The third experiment was to compare the recreated and original patterns pixel-by-pixel. Using an online tool for comparing two images, only the Kawung and Truntum patterns were tested since the Megamendung patterns were hugely different from each other. The results proved that attempting to manually recreate an exact duplicate of an existing Batik pattern would be relatively difficult. Other algorithms or methods would be required in order to generate a perfect recreation of a pattern. The next experiment was to examine the performance of the results in 3D environment by applying the images as image textures of a cloth simulation in Maya. Since the actual Batik is presented in the form of cloth, it would be good to examine how the digital patterns would perform in the 3D cloth simulation, as it might be useful in a game development or animated film production. The results show that the patterns would perform well in 3D environment without any visible pixels. In addition, the results show that the pattern would be suitable source for a repeating texture, with some adjustments especially for Megamendung and Truntum patterns. The final experiment was to investigate the speed of the algorithms and how they compare to each other. The results prove that Truntum was the pattern with the shortest running time to create and Megamendung was the longest due to its more complicated creation process. However, in practice, the time difference did not affect the results and they all managed to produced beautiful patterns. Overall, the results of the experiments point out to a conclusion that the algorithm and program developed in this project are successful. This project has proven that computer graphics, or computer science in general, can be used as a tool to create patterns inspired by a culture. On the other hand, the author believes that any other cultural heritage, not only Batik, could be a good inspiration for a research.
5.2
Benefits and Future Works
In the future, hopefully this project will be developed to help people in creating digital Batik patterns for various purposes, even without having any creative skills or ability to use image editing software such as Adobe Photoshop or InkScape. In addition, hopefully this project will eventually be able to help preserve cultural heritage.
Project Conclusion
51
Nevertheless, while this project has fulfilled its aims and objectives, it also came with flaws and disadvantages. Below are several improvements that could be made in future developments of the project: • User interface — the program in this project is only developed in the form of console, however a user interface could be useful for entering the values. • More flexible patterns — Almost every component in the patterns were fixed, from the size of a cloud shape to the thickness of the lines (some of them were manually adjusted to match the examples). Additional features for setting the thickness or distance between cloud shapes could be implemented in future developments. • Colour improvements — this improvement might be specific to Megamendung pattern in order to create a more natural look with colour gradation. • More patterns — there are numerous types of Indonesian Batik patterns, three of which were used in this project. Developing algorithm for other patterns would be a great addition. • Additional patterns algorithm — implementing other pattern generation algorithms in order to improve the quality of this project’s results. • Shading for 3D models — direct implementation of the algorithm in 3D modeling software such as Autodesk Maya or Blender for easier utilisation.
This page is intentionally left blank.
Appendix A Survey Questions
53
Appendix A: Survey Questions
54
Appendix A: Survey Questions
55
This page is intentionally left blank.
Appendix B Object Detection Results
(a) Object detection for M1
(b) Object detection for M2
(c) Object detection for M3 Figure B.1: Object detection results for Megamendung
57
Appendix B: Object Detection Results
(a) Object detection for K1
58
(b) Object detection for K2
(c) Object detection for K3 Figure B.2: Object Detection Results for Kawung
Appendix B: Object Detection Results
(a) Object detection for T1
59
(b) Object detection for T2
(c) Object detection for T3 Figure B.3: Object Detection Results for Truntum
This page is intentionally left blank.
Bibliography [1] UNESCO, “Indonesian batik - intangible heritage - culture sector,” 2016. [Online]. Available: https://ich.unesco.org/en/RL/indonesian-batik-00170 [2] “Workshop batik maswita cirebon.” [Online]. Available: http://workshopbatikcirebon. blogspot.co.uk/2012/07/batik-tulis-halus-mega-mendung-cirebon.html [3] B. Wyvill, K. van Overveld, and S. Carpendale, “Rendering cracks in batik,” in Proceedings of the 3rd International Symposium on Non-photorealistic Animation and Rendering, ser. NPAR ’04. New York, NY, USA: ACM, 2004, pp. 61–149. [Online]. Available: http://doi.acm.org/10.1145/987657.987667 [4] D. Khanafiah and H. Situngkir, “Computational batik motif generation: Innovation of traditional heritage by fractal computation,” February 2009. [5] D. Dunham, J. Lindgren, and D. Witte, “Creating repeating hyperbolic patterns,” in Proceedings of the 8th Annual Conference on Computer Graphics and Interactive Techniques, ser. SIGGRAPH ’81. New York, NY, USA: ACM, 1981, pp. 215–223. [Online]. Available: http://doi.acm.org/10.1145/800224.806808 [6] M. T. Wong, D. E. Zongker, and D. H. Salesin, “Computer-generated floral ornament,” in Proceedings of the 25th Annual Conference on Computer Graphics and Interactive Techniques, ser. SIGGRAPH ’98. New York, NY, USA: ACM, 1998, pp. 423–434. [Online]. Available: http://doi.acm.org/10.1145/280814.280948 [7] J. Lu, C. Barnes, C. Wan, P. Asente, R. Mech, and A. Finkelstein, “Decobrush: Drawing structured decorative patterns by example,” ACM Trans. Graph., vol. 33, no. 4, pp. 90:1–90:9, July 2014. [Online]. Available: http://doi.acm.org/10.1145/2601097.2601190 [8] F. Kerlogue, Batik: Design, Style & History. Thames & Hudson, 2004. [9] “8 filosofi batik berdasarkan motifnya yang sarat makna.” [Online]. Available: http://www.malesnulis.com/filosofi-batik/ [10] “http://batik-tulis.com/blog/batik-yogyakarta/attachment/gambar-batik-yogyakartamotif-nitik-truntum/.” [Online]. Available: http://batik-tulis.com/blog/ batik-yogyakarta/attachment/gambar-batik-yogyakarta-motif-nitik-truntum/ [11] J. Lv, W. Pan, and Z. Liu, “Method of batik simulation based on interpolation subdivisions,” Journal of Multimedia, vol. 9, no. 2, 2014. 61
Bibliography
62
[12] H. Situngkir, “Deconstructing javanese batik motif: When traditional heritage meets computation,” October 2008. [13] ——, “The computational generative patterns in indonesian batik,” 2008. [14] E. Susanti, “Variasi motif batik palembang menggunakan sistem fungsi teriterasi dan himpunan julia,” Jurnal Matematika, vol. 5, no. 1, pp. 36–44, 2015. [15] “Computer graphics curves,” 2017. [Online]. Available: https://www.tutorialspoint. com/computer graphics/computer graphics curves.htm [16] D. Salomon, Curves and Surfaces for Computer Graphics. Springer, 2006. [17] K. Singh, “Interactive curve design using digital french curves,” in Proceedings of the 1999 Symposium on Interactive 3D Graphics, ser. I3D ’99. New York, NY, USA: ACM, 1999, pp. 23–30. [Online]. Available: http://doi.acm.org/10.1145/300523.300525 [18] T. Ijiri, S. Owada, M. Okabe, and T. Igarashi, “Floral diagrams and inflorescences: Interactive flower modeling using botanical structural constraints,” in ACM SIGGRAPH 2005 Papers, ser. SIGGRAPH ’05. New York, NY, USA: ACM, 2005, pp. 720–726. [Online]. Available: http://doi.acm.org/10.1145/1186822.1073253 [19] A. Hertzmann, N. Oliver, B. Curless, and S. M. Seitz, “Curve analogies,” in Proceedings of the 13th Eurographics Workshop on Rendering, ser. EGRW ’02. Aire-la-Ville, Switzerland, Switzerland: Eurographics Association, 2002, pp. 233–246. [Online]. Available: http://dl.acm.org/citation.cfm?id=581896.581926 [20] I. Hanniel and R. Wein, “An exact, complete and efficient computation of arrangements ´ of bEzier curves,” in Proceedings of the 2007 ACM Symposium on Solid and Physical Modeling, ser. SPM ’07. New York, NY, USA: ACM, 2007, pp. 253–263. [Online]. Available: http://doi.acm.org/10.1145/1236246.1236282 ´ [21] T. F. Hain, “Fast termination criterion for recursive subdivision of bEzier curves,” in Proceedings of the 37th Annual Southeast Regional Conference (CDROM), ser. ACM-SE 37. New York, NY, USA: ACM, 1999. [Online]. Available: http://doi.acm.org/10.1145/306363.306407 [22] “Fractal – from wolfram mathworld.” [Online]. Available: http://mathworld.wolfram. com/Fractal.html [23] “What are fractals? – fractal foundation.” [Online]. Available: http://fractalfoundation. org/resources/what-are-fractals/ [24] “Sierpinski gasket - encyclopedia of mathematics.” [Online]. Available: //www.encyclopediaofmath.org/index.php/Sierpi%C5%84ski gasket
https:
[25] J. Greene, “Fleen.” [Online]. Available: http://www.fleen.org/ [26] F. Belhadj and P. Audibert, “Modeling landscapes with ridges and rivers: Bottom up approach,” in Proceedings of the 3rd International Conference on Computer Graphics and Interactive Techniques in Australasia and South East Asia, ser. GRAPHITE ’05. New York, NY, USA: ACM, 2005, pp. 447–450. [Online]. Available: http://doi.acm.org/10.1145/1101389.1101479
Bibliography
63
[27] C. C. Yang and F. L. Wang, “Fractal summarization: Summarization based on fractal theory,” in Proceedings of the 26th Annual International ACM SIGIR Conference on Research and Development in Informaion Retrieval, ser. SIGIR ’03. New York, NY, USA: ACM, 2003, pp. 391–392. [Online]. Available: http://doi.acm.org/10.1145/860435.860516 [28] D. Barbar´a and P. Chen, “Using the fractal dimension to cluster datasets,” in Proceedings of the Sixth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, ser. KDD ’00. New York, NY, USA: ACM, 2000, pp. 260–264. [Online]. Available: http://doi.acm.org/10.1145/347090.347145 [29] M. Gospodinov, “Simulation of fractal network teletraffic,” in Proceedings of the 14th International Conference on Computer Systems and Technologies, ser. CompSysTech ’13. New York, NY, USA: ACM, 2013, pp. 46–52. [Online]. Available: http://doi.acm.org/10.1145/2516775.2516813 [30] Y. Hariadi, M. Lukman, and A. H. Destiarmand, “Batik fractal: Marriage of art and science,” Journal of Visual Art and Design, vol. 4, no. 1, 2013. [Online]. Available: http://journals.itb.ac.id/index.php/jvad/article/view/755 [31] M. F. Barnsley, Fractals Everywhere. Academic Press, Inc., 1988. [32] S. Demko, L. Hodges, and B. Naylor, “Construction of fractal objects with iterated function systems,” in Proceedings of the 12th Annual Conference on Computer Graphics and Interactive Techniques, ser. SIGGRAPH ’85. New York, NY, USA: ACM, 1985, pp. 271–278. [Online]. Available: http://doi.acm.org/10.1145/325334.325245 [33] D. Wu, J. Roberg´e, D. J. Cork, B. G. Nguyen, and T. Grace, “Computer visualization of long genomic sequences,” in Proceedings of the 4th Conference on Visualization ’93, ser. VIS ’93. Washington, DC, USA: IEEE Computer Society, 1993, pp. 308–315. [Online]. Available: http://dl.acm.org/citation.cfm?id=949845.949901 [34] J. Yao, H. Zhang, B. Wu, F. Lin, and B. Wang, “The research and realization of parameterized three-dimensional plant simulation based on fractal theory,” in Symposium on Interactive 3D Graphics and Games, ser. I3D ’11. New York, NY, USA: ACM, 2011, pp. 212–212. [Online]. Available: http://doi.acm.org/10.1145/1944745.1944792 [35] “Bezier curves and surfaces.” [Online]. Available: https://www.gamedev.net/articles/ programming/graphics/bezier-curves-and-surfaces-r1808 [36] “Sejarah mega mendung batik cirebon (the history of batik mega mendung from cirebon).” [Online]. Available: http://batikaslicirebon.blogspot.co.uk/2012/03/batik-cirebon.html [37] “Kain batik megamendung cirebon - yellow.” [Online]. Available: https://kravasia.com/ collections/cirebon/products/kain-batik-megamendung-cirebon-yellow [38] “Batik kawung, motif batik bermakna kesucian dan panjang umur.” [Online]. Available: https://www.fimela.com/lifestyle-relationship/ batik-kawung-motif-batik-bermakna-kesucian-dan-panjang-umur-1505260.html [39] “Batik truntum.” [Online]. Available: https://simple2ringo.wordpress.com/2012/01/23/ batik-the-never-ending-fashion/batik-truntum/
Bibliography
64
[40] “Adobe color cc.” [Online]. Available: https://color.adobe.com [41] “Easyrgb.” [Online]. Available: https://www.easyrgb.com/en/convert.php#inputFORM [42] O. Jamhari, “#kotekatrip geliat pariwisata kota udang, cirebon.” [Online]. Available: http://www.kompasiana.com/onyjamhari/ smart-traveler-pegang-kendali-wisata-cirebon 59394fca45480223f8348de4 [43] “Pusat batik cirebon.” [Online]. Available: http://batikcirebonan.jejualan.com/produk/ mega-mendung-tembokan-satu-kelir [44] “Batik: Kawung pattern.” [Online]. Available: http://owltowncollections.blogspot.co. uk/2014/02/batik-kawung-pattern.html [45] “Sulis batik: Kawung.” [Online]. Available: http://sulisbatik.blogspot.co.uk/2012/10/ kawung.html [46] “Motif batik truntum.” [Online]. Available: https://ubatik.wordpress.com/2010/08/24/ motif-batik-truntum/ [47] “Pesona ’truntum’.” [Online]. Available: pesona-truntum/
https://rynari.wordpress.com/2012/01/07/
[48] MATLAB, “Label images for classification model training.” [Online]. Available: https: //uk.mathworks.com/help/vision/ug/label-images-for-classification-model-training.html [49] ——, “Train a cascade object detector.” [Online]. Available: https://uk.mathworks. com/help/vision/ug/train-a-cascade-object-detector.html# [50] J. Cryer, “Resemble.js: Image analysis and comparison.” [Online]. Available: https://huddle.github.io/Resemble.js/ [51] OpenGL, “9.1 glutget.” [Online]. Available: https://www.opengl.org/resources/libraries/ glut/spec3/node70.html