Segehan Identification system for Android Using HSV and Invariant Moment

 

 

1I Made Adi Sedana, 2I Putu Agung Bayupati, 3Gusti Made Arya Sasmita

 

Information Technology Department, Faculty of Engineering, Udayana University

Jimbaran, 80361

Bali, Indonesia

1adysedana@gmail.com, 2bayupati@it.unud.ac.id, 3aryasasmita88@gmail.com

 

 

Abstract

 

Segehan is a small level offering for the God by Hindu religion in Bali Island. Segehan composition consists of banana leaves, janur, rice, onion, ginger, salt and flowers. Segehan has different features so that it is difficult to remember and recognize each type. The implementation of digital image technology can be a solution to identify the types of Segehan. The use of digital image processing technology by using HSV (Hue Saturation Value) method, Color Histogram method, Invariant Moment Method and Euclidean Distance Method can be used to solve this problem. HSV is useful as a method in order to do segmentation of objects Segehan by utilizing color space which is then filtered according to the reference limits for selected color selection and the use of the Color Histogram method as a process for color feature extraction. The Invariant Moments method is used for extracting feature shapes then the Euclidean Distance method is used to calculate the similarity in the form of training data with test data. The final processing is the identification of Segehan types based on color characteristics and shape features. This study has a percentage of success in recognition of Segehan type is 75%, not recognized is 25%.

 

Keywords-Computer Vision; Segehan; Android; Hue Saturation Value; Color Histogram; Invariant Moments; Euclidean Distance

 

1. Introduction

 

Bali is one of islands in Indonesia which has many cultures. Bali is not only enriched by its natural resources, but also by its cultures which holds life values with Hinduism nuance. Bali is enriched by its diversity, such as tradition which is owned by each region in Bali, religion and belief, arts, peculiar culinary, traditional house, traditional clothes, and religious places in Bali. Balinese life is strong with its religious tradition, thus, Balinese people do activities of worship or ritual ceremony peacefully in certain days. In conducting the ceremony, it is symbolized by ritual offering called banten to be delivered to the God. Banten is an offering as a mean for Hindus people to be close with God. Banten also as a mean of gratitude, feeling of love, and grateful to the God. Banten itself is categorized based on its functions, one of it is Segehan. Segehan is used for a ritual ceremony for Bhuta Yadnya, in which a ritual ceremony dedicated to the Bhuta or supernatural beings. The purpose of Bhuta Yadnya is neutralizing negative power in the nature to be positive power. Segehan is a symbol to keep the harmonious relationship between human beings and supernatural beings in the environment of human beings.

The researches related to Balinese culture had been conducted in many studies, such as: [1] this research was focused on the identification of Balinese traditional snacks by using Tree Structure method and Recursive Algorithm based on Android system, in which the purpose is to assist the society which have difficulties in finding information about the ingredients of Balinese traditional snacks, [2] this research also discussed about Balinese culture which focused on the basic of Balinese choreography by using Augmented Reality based on Android system which is used to introduce Balinese dance to attract the larger society, [3] in addition, this study discussed about the identification of the ceremony of Balinese traditional anniversary by using Augmented Reality based on Android system to introduce it to the large society, because there still many people who do not aware about that tradition. Those studies are related to the identification of Balinese culture. However, there is no study about the identification of Segehan which becomes daily offerings in Hindu’s tradition in Bali. Moreover, the use of digital image is rarely used to introduce the existence of the culture.

This study was conducted to solve the problems of the lack of information for young generation and today’s society about Segehan. The use of image processing technology has become the solution which is used to introduce Hindus tradition in Bali. Nowadays, an identification system that is effective and efficient to be used by many people is Android based smartphone. The development of Identification System of Segehen Based on Android can assist the society to identify the types of Segehan in which it is a medium of Hindus ritual ceremony. It used digital image technology based on Android that can be an access to know the information about Segehan easily. The identification of Segehan used several methods and features that were used to identify each type of Segehan, and the result of the identification is displayed to the users. In addition, there are also several menus that can be used by the users, they are list of information about the location, function, and meaning of each type of Segehan.

Color and shape is used as the main feature to identify the types of Segehan, both of the features can be identified by using HSV method and Invariant Moment. The research related to the use of HSV method had been conducted in many studies, such as [4] utilizing HSV method to detect the texture of an image. HSV method is used to identify the quality of an application in detecting a texture if it is changed into HSV color. The result of the study showed that the quality in identifying the texture of an image by using HSV method was 87.9% with 72.5% of accuracy rates, [5] this study also discussed about the ability of Android application in detecting an object in the pictures that are saved in the cellular gallery, based on the color, shape, or feature. The pictures are processed in the HSV color domain for a better color detection. The round shape is detected by using Circular Hough Transform and the other shapes are detected by using Algoritma Douglas-Peucker. Based on the experiment, the application is able to detect eleven different colors, two geometries dimension including round shape, rectangle, triangle, and square correctly based on the local feature of the object and view of the pictures in any condition. The identification feature with HSV method by using parameter of color is a reference in identifying Segehan. The use of HSV is better than RGB color space because HSV has more color spaces, therefore it is easier in classifying the color of Segehan. Shape feature can be identified by using Moment Invariant Method. There are previous studies which were success in using Invariant Moment, such as [6] the study that used Invariant Moment based on Racah Polynomials to classify a picture and the combination of KNN method to identify the pattern, [7] this study also discussed about the efficiency of the use of Invariant Moment Method and Principle Component Analysis (PCA) in the technique of picture identification by analyzing the speed of calculation efficiency of each  value of Invariant from different picture.

 

2. Application’s Overview

 

Identification System of Segehen using Android is an application which is able to identify the types of Segehan and provide information about the function and meaning of Segehan. The users only need a smartphone that is already installed with the application. The followings are the overview of the application:

 

Figure 2 Application Overview

Figure 2 is the overview of how the system is running. In using the system, there are several steps that have to be followed: first, the users input the image by using camera in the smartphone or taken from the gallery. Then, it is followed by pre-processing step and segmentation process to separate the required image. After that, the extraction of color characteristic extraction of image is conducted. If the information of color and shape are available, the verification and identification are done to get result the type of Segehan.

 

3. Research Schematic

 

Each type of Segehan has its unique feature. These features will be used to distinguish each type in training data. In this study, Segehan has several types as follows:

 

Table 1: List of Segehan Type

Segehan Type

Segehan Name

Composition

Segehan Sasah

Sasah Putih

White rice contains flowers, onions, ginger and salt

Sasah Kuning

Yellow rice contains flowers, onions, ginger and salt

Sasah Hitam

Black rice contains flowers, onions, ginger and salt

Sasah Merah

Red rice contains flowers, onions, ginger and salt

Sasah Putih-Kuning

White and yellow rice contains flowers, onions, ginger and salt

Sasah Putih-Hitam

White and black rice contains flowers, onions, ginger and salt

Sasah Pancawarna

White , yellow, black and red rice contains flowers, onions, ginger and salt

Segehan Kepel

Kepel Putih

White rice with oval shape contains flowers, onions, ginger and salt

Kepel Kuning

Yellow rice with oval shape contains flowers, onions, ginger and salt

Kepel Hitam

Black rice with oval shape contains flowers, onions, ginger and salt

Kepel Merah

Red rice with oval shape contains flowers, onions, ginger and salt

Kepel Putih-Kuning

White and yellow rice with oval shape contains flowers, onions, ginger and salt

Kepel Putih-Hitam

White and black rice with oval shape contains flowers, onions, ginger and salt

Kepel Pancawarna

White , yellow, black and red rice with oval shape contains flowers, onions, ginger and salt

Segehan Saiban

Rice, vegetables, fish or meat and salt

Segehan Agung

Rice, an egg, candlenut

Segehan Wong-Wongan

Rice shaped like a human

 

Identification system of Segehan using Android used several steps and methods to make sure the type, the HSV and Invariant Moment methods have an important function for managing Segehan by using shape and color features as data reference to get the appropriate identification results. HSV (Hue Saturatuion Value) provides color space in the form of three main components, namely color, saturation, and value. Hue is an angle from 0 up to 360 degrees. Usually 0 is red, 60 degrees is yellow, 120 degrees is green, 180 degrees is cyan, 240 degrees is blue, and 300 degrees is magenta. Color saturation is the size of the color genuineness. Saturation is usually 0% to 100%. The value or intensity is the size of color brightness or the light that comes from color. The Value is usually from 0% to 100%. HSV has a role in the process of segmentation which used color reference value that is determined previously, and it will separate the information that is needed and not needed, then the color extraction process is performed using the Color Histogram method. Color Histogram is a method of color extraction by calculating the number of color distributions with the number of pixels of each color portion. Generally a normalization of histogram is done by dividing each value from its gray depth to the number of pixels in the picture. The Invariant Moment method is used for extracting the Segehan feature. Invariant Moment is a method of finding characteristic from an object. The characteristics that are considered are in form of positions, areas, relationships, and characteristics that produce 7 Invariant Hu Moment Values to be used as keypoint values. Euclidean Distance is a metric that is commonly used for calculating the similarity of two vectors. The method is used in training data in order to get a correct segehan type.

 

4. Result and Discussion

 

Identification System of Segehen using Android was arranged in the Android platform and using library OpenCV. The application would be running if the OpenCv Manager was already installed in the device to make the functions in the library running. The main process in the library is identifying types of Segehan and displaying the result to the users.

 

(a)                                          (b)                                               (c)                                             (d)

           Figure 4 (a) Main Menu (b) Input (c) Result (d) Information feature

 

Figure 4 (a), (b), (c), and (d) are the screenshot of features in the application. The features are the main menu that is used to show the other menus in the application, the identification process with input from camera or gallery, showing the identification result to the users, and the information which is used to show the information of Segehan type. The detail process of the identification of Segehan types shown as follow:

Figure 5 Detail Process of Recognition

Figure 5 shows the Segehan identification process, there are several steps that are running in order to recognize an Segehan, data acquisition from images input by the user and the source of the image can take from the camera or gallery and the cropping process used to take the required part of the image . The preprocessing stage have functions to improve image quality so that it is easier to process later, the image is converted to smoother to reduce noise using the Median Filter method, the Median Filter method is one of the most effective methods for reducing image noise. Segmentation process used to separate the required image information and from those that are not needed using the HSV method, the HSV method is a useful method for color segmentation by changing the image to the HSV color space then a color filter will be segmented. Extracting color features from the results of segmentation using the Color Histogram method, the Color Histogram method functions to extract color characteristics based on the values ​​of Hue, Saturation and Value to be compared to the data in the database. The process of calculating the similarity between training data with test data using the Euclidean Distance method, the Eudiclian Distance method is a method that can be used to compare the similarities of 2 different data, if the results of the calculation are close to 0 or equal to 0 then the data is the same. Matching data will be the result of the color decision that is owned by the image and the final decision will be combined with the shape matching result.

The form identification process after the preprocessing stage is continued with image conversion using the Canny method, the Canny method functions to get the edges of the image and convert the image to binary, the edges of the image make it easy to identify the shape features because the shape can be recognized by using the image edge forming pattern. The next step is to extract the characteristics of the form using Invariant Moment method, Invariant Moment method can extract the shape and generate 7 keypoint values ​​that will be stored in the database, keypoint data in the database with keypoint on the test data will be matched using the Euclidean Distance method, method Eudiclian Distance is a method that can be used to compare the similarities of  2 different data, if the results of the calculation are close to 0 or equal to 0 then the data is the same. Matching data will be the result of the decision form that is owned by the image. Both color and shape decisions will be combined to produce a final decision of the Segehan according to its type.

 

Table 2: Recognition Result of Segehan

 

No.

Segehan Name

Sample Total

Recognized

Unrecognized

1

Sasah Putih

4

3

1

2

Sasah Kuning

4

4

0

3

Sasah Hitam

4

4

0

4

Sasah Merah

4

4

0

5

Sasah Putih-Kuning

4

2

2

6

Sasah Putih-Hitam

4

2

2

7

Sasah Pancawarna

4

2

2

8

Kepel Putih

4

3

1

9

Kepel Kuning

4

4

0

10

Kepel Hitam

4

4

0

11

Kepel Merah

4

4

0

12

Kepel Putih-Kuning

4

2

2

13

Kepel Putih-Hitam

4

2

2

14

Kepel Pancawarna

4

2

2

15

Saiban

4

3

1

16

Agung

4

3

1

17

Wong-Wongan

4

3

1

Success Rate

75%

25%

Table 2 shows that by using combination of shape and color features provided 75% success in identification and 25% failed.

 

5.    Conclusion

 

Identification System of Segehen using Android is able to identify types of Segehan. The development of application used HSV method, Color Histogram, Invariant Moment, and Euclidian Distance to identify the types of Segehan with success rate is nearly 75%. Successful of identification depends on the lighting and the way of taking the picture, because it can affect the shape and color feature detection from the picture.

 

References

[1]       Kadek, N., & Rusjayanthi, D. (2016). Implementation of Tree Structure and Recursive Algorithm for Balinese Traditional Snack Recipe on Android Based Application, 10(4), 43–47.

[2]       Putu, N. I., Franza, S., & Wibawa, K. S. (2016). Application Of  Basic Balinese Dance Using Augmented Reality, 90(1).

[3]       Sujana, I. W. M. E. I., Kadek, N. I., & Rusjayanthi, D. W. I. (2017). Arbantenotonan: A Learning Media Base On Augmented  Reality Traditional Balinese Birthday Ceremony Equipment, 95(7), 1362–1369.

[4]       Deswal, M., & Sharma, N. (2012). A  Fast HSV Image Color and Texture Detection and Image Conversion Algorithm. International Journal of Science and Research (IJSR) ISSN (Online Impact Factor, 3(6), 2319–7064.

[5]       Elrefaei, L. A., Al-musawa, M. O., & Al-gohany, N. A. (2017). D Evelopment O F a N a Ndroid a Pplication F or O Bject D Etection B Ased O N C Olor , S Hape , O R L Ocal F Eatures, 9(1), 21–30.

[6]       Batioua, I., Benouini, R., Zenkouar, K., & Zahi, A. (2018). ScienceDirect Image Image classification classification using using separable separable invariants invariants moments moments based based on on Racah polynomials Racah polynomials. Procedia Computer Science, 127, 320–327.

[7]       Arafah, M., & Moghli, Q. A. (2017). Efficient Image Recognition Technique Using Invariant Moments and Principle Component Analysis, 1–10.

[8]       Z. Huang and J. Leng, “Analysis of Hu’s Moment Invariants on  Image Scaling and Rotation”, In Proceedings of  the International Conference on Computer Engineering and Technology (ICCET), pp. 476-480, 2010.

[9]       Sudarsana, I. B. P., & Yayasan Dharma Acarya. (2010). Ajaran agama Hindu. Bali: Yayasan Dharma Acarya Percetakan Mandara Sastra.