UNIVERSITI TEKNIKAL MALAYSIA MELAKAeprints.utem.edu.my/16602/1/Automatic Ablution Machine Based On...
Transcript of UNIVERSITI TEKNIKAL MALAYSIA MELAKAeprints.utem.edu.my/16602/1/Automatic Ablution Machine Based On...
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
AUTOMATIC ABLUTION MACHINE BASED ON IMAGE
PROCESSING
This report submitted in accordance with requirement of the Universiti Teknikal
Malaysia Melaka (UTeM) for the Bachelor Degree of Manufacturing
Engineering (Robotic and Automation) (Hons.)
by
NUR RAMIZA BINTI MOHD RAZALI
B051110179
920112-11-5534
FACULTY OF MANUFACTURING ENGINEERING
2015
i
ABSTRACT
In today’s era of well developing infrastructure, demands in modern and new
technology growth rapidly since it contributes a significant contribution in much kind
of aspects. One of the most important and frequently used is the machine vision
technology. In machine vision technology, there are many application used image
processing technique such as inspection, face recognition, sorting, video surveillance,
sign language systems, fingerprint recognition and hand gesture recognition to
control some devices likes computer, cell phones, and TV which allowing the
process run faster. The main objective of this project is to develop an ablution system
based on skin detection. This project will apply image processing technique to detect
the human skin. The structure for this project divided into two main parts which is
hardware and software. In hardware parts, the Logitech Quick Cam E-3500 Plus PC
Camera and Arduino UNO controller will be used in order to actuate the servo motor
to open or close the tap according to the skin detected. This project will activate the
tap automatically when there is a present of skin instead of manually opened the tap
when performing ablution. This machine also saving the water consumption during
perform an ablution compare to perform an ablution manually. The cost of water
consumption when perform an ablution using automatic ablution machine is lower
compare to perform an ablution manually.
ii
ABSTRAK
Dalam era yang canggih serta pesat membangun, permintaan dalam teknologi yang
baru dan moden meningkat dengan cepat kerana ia menyumbang sumbangan yang
penting dalam pelbagai aspek. Antara sumbangan yang terpenting dan selalu digunakan
adalah teknologi penglihatan. Dalam teknologi penglihatan, terdapat banyak teknik
pemprosesan imej digunakan seperti pemeriksaan, pengiktirafan muka, menyusun,
pengawasan video, sistem bahasa isyarat, pengiktirafan cap jari dan pengecaman
pergerakan tangan untuk mengawal sesetengah komputer, telefon bimbit, dan
televisyen yang membolehkan proses berjalan dengan lebih cepat. Tujuan utama
projek ini adalah untuk membina sistem wudhu yang boleh mengesan permukaan
kulit manusia. Projek ini akan menggunakan teknik pemprosesan imej untuk
mengesan kulit manusia. Struktur untuk projek ini dibahagikan kepada dua bahagian
utama iaitu perkakasan dan perisian. Dalam bahagian perkakasan, Logitech Quick
Cam E-3500 Plus PC kamera and Arduino UNO akan digunakan untuk
menggerakkan motor servo untuk membuka atau menutup pili mengikut kulit yang
dikesan. Projek ini akan mengaktifkan pili secara automatik apabila kulit dikesan dan
bukannya membuka pili air secara manual ketika hendak berwuduk. Dengan
menggunakan mesin wudhu automatik untuk berwudhu, penggunaan air dapat
dikurangkan berbanding berwudhu secara biasa. Kos penggunaan air menggunakan
mesin wudhu automatik juga lebih rendah berbanding berwudhu secara biasa.
iii
DEDICATION
Specially dedicated to my beloved parents, Mohd Razali bin Omar and Wan Rokiah
binti Wan Muda and to my supervisor, Encik Ruzaidi bin Zamri, and all my friends
who have encouraged, guided, and inspired me throughout the study process.
iv
ACKNOWLEDGEMENT
Bismillahirrahmanirrahim,
Alhamdulillah, thanks to Allah SWT, who with his willing giving me the opportunity
to complete this Final Year Project (FYP).
Firstly, I would like to express my deepest gratitude to my project supervisor, Encik
Ruzaidi bin Zamri who had guided me to complete this project successfully. I would
like to express an appreciation for his ideas, guidance, encouragement and
professionally giving constant support in ensuring this project possible and run
smoothly as per planning schedule.
I also truly grateful to those lecturers and staff of Manufacturing Engineering
Department, UTeM that willing to help me in many ways. Sincerely thanks to them
for their excellent corporation, supports and inspiration during this project.
Also, thanks to all my friends, those who have been contributed by supporting my
work, giving ideas and help me during this project started till it is fully completed.
Last but not least, deepest thanks and appreciation to my family for giving me
encouragement and for their good- natured forbearance with me during completion
of this project.
v
TABLE OF CONTENT
Abstract i
Abstrak ii
Dedication iii
Acknowledgement iv
Table of Content v
List of Abbreviations, Symbols and Nomenclatures viii
List of Figures ix
List of Tables xi
CHAPTER 1: INTRODUCTION 1
1.1 Background of study 1
1.2 Problem statement 4
1.3 Objectives 4
1.4 Scope 4
1.5 Report structure 5
CHAPTER 2: LITERATURE REVIEW 6
2.1 Introduction 6
2.2 Automatic ablution machine 6
2.3 Image processing technique 8
2.4 Skin colour classification 9
2.4.1 Dynamic hand gesture segmentation 9
2.4.2 Static hand segmentation 15
2.5 Journal analysis 19
2.5.1 Journal mapping 19
2.5.2 Journal review tables 23
2.6 Summary 24
vi
CHAPTER 3: METHODOLOGY 36
3.1 Introduction 36
3.2 Overall methodology 37
3.3 Literature review 39
3.4 Planning 39
3.5 Develop of system 40
3.5.1 Hardware system 41
3.5.2 Software system 45
3.5.2.1 MATLAB software 45
3.5.2.2 Arduino 47
3.5.2.2.1 Arduino Pin Description 48
3.5.2.2.2 Characteristic 49
3.6 Programming 50
3.6.1 Image processing techniques 58
3.6.1.1 Stage 1 : Image acquisition 51
3.6.1.2 Stage 2 : Image pre-processing 51
3.6.1.3 Stage 3 : Image enhancement 51
3.6.1.4 Stage 4 : Classification Process 52
3.6.2 Skin detection method 53
3.7 Hardware testing and analysis 54
3.7.1 Experimental setup 54
3.7.2 Experiment procedure 56
3.7.3 Expected result 56
3.8 Summary 57
CHAPTER 4: RESULT AND DISCUSSION 58
4.1 Introduction 58
4.2 Designing programming 58
4.2.1 Programming flowchart 59
4.2.2 Programming algorithm 60
4.3 System structure 62
4.3.1 Matlab coding 65
4.3.1.1 Stage 1 : Image acquisition 62
vii
4.3.1.2 Stage 2 : Image pre-processing 63
4.3.1.3 Stage 3 : Image enhancement 63
4.3.1.4 Stage 4 : Classification Process 64
4.3.2 Arduino coding 64
4.4 Skin detection experiment 64
4.4.1 Skin detection using MATLAB 66
4.5 Water consumption of ablution system 68
4.5.1 Manual ablution 68
4.5.2 Automatic ablution machine 70
4.5.3 The overall volume for water consumption 72
4.6 Water consumption cost 77
4.6.1 Manual ablution cost 78
4.6.2 Automatic ablution machine cost 78
4.6.3 The overall cost of water consumption 79
4.7 Overall discussion 81
4.8 Summary 82
CHAPTER 5: CONCLUSION AND FUTURE WORKS 83
5.1 Conclusion 84
5.2 Limitation 85
5.3 Suggestion and Future development 85
REFERENCES 86
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D
viii
LIST OF ABBREVIATIONS, SYMBOLS AND
NOMECLATURES
UTeM - Universiti Teknikal Malaysia Melaka
PBUH - Peach Be Upon Him
ROI - Region Of Interest
AWW - Automatic Wudhu Washer
HOG - Histogram of Oriented Gradient
SVM - Support Vector Machine
HCI - Human-Computer Interaction
HSV - Hue Saturation Value
GL - Grey Level
BL - Back Ground Luminance
HSI - Hue, Saturation And Intensity
RGB - Red, Green and Blue
YCrCb - Luminance (Y) and chrominance components (CrCb)
MLP - Multi Layer Perceptron
AC - Alternating Current
DC - Direct Current
FKP - Fakulti Kejuruteraan Pembuatan
FTMK - Fakulti Teknologi Maklumat dan Komputer
ix
LIST OF FIGURES
1.1 The variation of ablution station 3
2.1 Auto Wudhu Washers (AWW) model STD 707 7
2.2 Auto Wudhu Washers (AWW) model STD 708 8
2.3 Process of hand gesture recognition 10
2.4 Example of an initial image 11
2.5 Example of using '3σ -principle' of normal distribution for hand
gesture detection 11
2.6 Original hand images and skin probability distribution images 12
2.7 Original hand images and statistic moving information 12
2.8 The result of the region growth 13
2.9 Hand gesture segmentation flowchart 14
2.10 Image processing procedure 15
2.11 Original image 17
2.12 Face segmented image 18
2.13 Skin segmented image 18
3.1 The project methodology flow chart 38
3.2 The block diagram of Automatic Ablution Machine based on Vision 42
3.3 The controller 43
3.4 The actuator 43
3.5 The sensor 43
3.6 Schematic of controller (Arduino and servo motor) 44
3.7 The MATLAB software 45
3.8 The algorithm of Automatic ablution machine 46
3.9 The Arduino software 48
3.10 Arduino description 49
3.11 The characteristic of Arduino board 49
3.12 Image processing procedure 50
3.13 Image enhancement 52
x
3.14 The skin detection flowchart 53
3.15 FTMK pray room 55
3.16 Mechatronic laboratory 55
4.1 The process flow of automatic ablution machine 59
4.2 Image acquisition tool 63
4.3 The percentage of skin detection 65
4.4 Graph of data sample of water consumption during ablution 72
4.5 The average of water consumption during ablution 73
4.6 Total volume of water consumption for a day 74
4.7 Total volume of water consumption for a month 75
4.8 Total volume of water consumption in a year 76
4.9 Cost of water consumption in a month 79
4.10 Cost of water consumption in a year 80
xi
LIST OF TABLES
2.1 The summary of parameters used in 45 journals. 22
2.2 List of journal
2.3 Summarized of the total papers reviews
4.1 Skin detection experiment 73
4.2 The sample of human skin in several skin object 74
4.3 The water consumption of manual ablution 76
4.4 The summary of water consumption for manual ablution 77
4.5 The water consumption of Automatic Ablution Machine 78
4.6 The summary of water consumption for Automatic Ablution Machine 79
4.7 The total volume of water consumption for ablution 82
4.8 The Tariff Code of water consumption 85
4.9 The calculation of water consumption of manual ablution 86
4.10 The calculation of water consumption of Automatic Ablution Machine 86
4.11 The cost of water consumption 87
1
CHAPTER 1
INTRODUCTION
1.1 Background of study
Islam is a religion in which people being obeyed to their credence to the sole One
God and accept Prophet Muhammad Peace Be Upon Him (PBUH) while the herald
of God. People with this submission is referred as Muslim. The religion of Islam is
predicated on five pillars. The five pillars of Islam are the basic of Muslim life
which by means have faith and belief in the one and only God and finally of the
Prophethood of Muhammad, besides pray five times each day, concern for and by
helping a hand to the needy, refinement through fasting and the pilgrimage to
Makkah for those who are able. One of the pillars is by achieve daily prayers. It is a
must for a Muslims who mature to perform the prayers. The individual must brace
their self with ablution before execute a prayer. The one who is without an ablution
is prohibited to execute prayer.
Ablution is purified procedures that have an essential role within the teachings of
Islam. Ablution or Wudhu is washing ritual that involves both of physical and
spiritual. Ablution can be recommended because of body hygiene in term of physical
and in terms of spiritual, the purity of the soul can be able to be protect. Ablution is
a process of using water to being adapted on a certain parts of body in order to
cleanse someone from a tiny dust or impurity before performing the prayers. The
Wudhu term is indicated from basic Arabic's words called Al-wadhaah which means
clean and bright. Al-wudhu is really a verb to explain the cleaning activity using
water. The Al-wudhu in English translation is ablution. In Islamic, the acts that start
with the intention, and then accompanied by washing on certain body followed by
washing both of hands, face, sweep the top of head and both of feet.
2
Before executed the prayers, Muslims must be clean from any dirt and must wear a
clean and tidy clothes. Besides, based on hadith that quoted by The
Prophet Muhammad , said 'cleanliness is 50% of faith’. The Prophet also said "If
there was a river at the entranceway of anyone of you and he took a tub inside five
times per day could you notice any dirt on him?" His companions said, "Not a trace
of dirt could be left." The Prophet added, "That's the exemplary case of the five
prayers with which Allah blots out evil deeds" (Bukhari). In addition, the ablution or
wudhu should be executed according to order starting with washing the hand, take
water into mouth, inhale water into nose, washing the face, washing the fore-arms,
wiping of the head, both ears and wash both feet including ankles. Each order must
be reoccur for three times. From the Islamic prospective, it can be said that there are
four necessary acts of washing which by washing the face, washing the fore-arms,
wiping of the head, wash both feet including ankles.
Based on research, wudhu’ process must need about six to nine litres of water
eventhough there are only two litres of water is used for the whole ritual. (Rachmat
et al., n.d.). Despite, the clumsy person will used more water for executed the
ablution. From the Islamic prospective, the energy saving of water is highly being
can be reduced. In Islam, the conservation of water is highly highlighted as be said
by Prophet Muhammad PBUH. After all, this machine is user friendly and does not
pollute the air and permitted Muslims to perform the ablution without wasting the
water. This sensor and the servo motor can be said as actuator that is comprised on
crane to turn and open it regards on the object under the crane. Not just in that case,
the rate of water that Muslim needs in order to do the ritual also being detected in
this machine. In this new era, many persons invented the previous automatic
ablution machine but the price is increased due to it has been commercialized
(Rachmat et al., n.d.). Due to that, automatic ablution system based on image
processing technique that easy, cheap and environmental friendly are invented.
N.H. Johari have proposed a supposed framework based the usage of wudhu’ tub
through design development which being same with product fabrication. But the
conserving of water during wudhu’ is very demand as a result of human behavior.
This behavior is distinctive from person to person.
3
Ablution ritual is an important for those who want to perform prayers (Hassan and
M. F. Kamaruzaman,2013). Prayers are not complete without this cleansing ritual
unless in an emergency with replacing ablution with tayammum ritual. The Muslims
introduced a certain place to execute this ritual when involves the usage of water, to
facilitate Muslims to execute ablution. An ablution station has many designs
variations. Figure 1.1 below show several kinds of performed ablution station. The
benefit of automatic ablution system enable Muslims to save a lot of water whenever
they execute the pre-prayer cleansing ceremony and able to save this life-sustaining
resource.
Figure 1.1: The variation of ablution station.
The cleansing ceremony has been stated in the Holy Al-Quran and it is called
Sunnah or Hadith. Since 14 centuries ago, the basic method of wudhu’ have been
specified in the Al-Quran. (R. Anwar,2012).
As in article from i.islam, ablution is a simple command from God to test our
obedience and God loves those who make themselves clean and pure. Who are
performed the prayer are having "one on one" time with God. They are having a
spiritual connection directly with God at that moment. So, ablution is compulsory
before performing prayers and before having "one on one" time with the Creator.
4
1.2 Problem statement
Regarding to the previous studies, it is states that there are an issue based on the
water consumption and by 2025, more than 2.8 billion people in 48 countries will
lack access to water supplies (O. H. Hassan and M. F. Kamaruzaman,2013). There
are a few activities that can lead to water demand which are ablution, irrigation,
service shower, kitchen, and toilet cleaning.
Recently, individuals have invented the first automatic ablution machine, but when it's
commercialized the price is indeed expensive and targeted on specific market segment.
On that reason, there is a need to develop automatic ablution machine that is easy and
cheap.
1.3 Objective
The specific objective that need to be achieved is:
i. To develop Matlab coding for skin detection.
ii. To analyze cost and water saving of automatic ablution machine.
1.4 Scope
The purpose of this project is to develop an automatic ablution machine for reduce
water consumption during perform ablution.
The scope for this project is:
i. This machine is only for ablution purposes.
5
1.5 Report Structure
This research project can be categorized into three main chapters which are
introduction, literature review and methodology. There are some short description
for the related chapters. Chapter 1 will be comprised into five major titles which are
background, problem statement, objective and scope. In the background, it will
described about the basic idea about the research project. Then, the problem
statement explained about the current problems that need to be justified before
solving the related problems. After that, it is objective that need to be obtained
throughout this research project. Finally, the scope that will covers the range of what
will be focused on throughout this research project.
Meanwhile in Chapter 2 will explained on the literature review which covering the
previous research that done by others and study the related data in order to get the
best information to do this research project.
Chapter 3 will explained about the methodology that being functioned to achieve
the objective and the scope of the project. This chapter illustrates the all activities
from the beginning until the end of the research project.
In the Chapter 4, it will be covers about the expected result that need to be achieved
throughout this analysis project . Moreover, the problems that are associated with
the project is also being mentioned. Finally comes to Chapter 5 that will explained
about the product or outcome of this research project.
6
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
This chapter will discussed the literature review of three subtopic. The first subtopic
is the history of the automatic ablution. The second subtopic is image processing
technique from previous study. The previous methods used in image processing
techniques which divided into two. First is hand gesture segmentation and the
second is hand segmentation used for skin detection.
2.2 Automatic Ablution Machine
Automatic ablution machine is the machine that have the ability to save much water
when Muslims wants to do pre-prayer cleansing ceremony called wudhu (ablution).
This ablution machine conceded Muslims to do the cleansing ritual without wasting
of water and is environment-friendly because it promoted water spillage. R.Anwar
(2013) has stated that ablution is the act of usage of water to the specific body parts
to cleanse from small impurities.
There are some information about the other machine which is the Auto Wudhu
Washer (AWW) (Patent Pending) which is the worlds’ first automatic wudhu’ that
introduced to allow Muslim to execute the ablution in a standing position with an
extraordinary with the adequate of water and time and in conformance to Holy
Quran teachings. AACE has designed and developed two version of AWW. The
very first version is AWW model STD 707 and the second version is AWW model
PRM 708. The AWW model STD 707 is produced technically for being functioned
in the certain place only such as in mosques, offices and what not.
7
There are many components of AWW which comprised of intention built ear,
mouth, and facial washer unit, a forearm and elbow washing unit and a foot and
ankle washing unit all of which are incorporated within a system. By connecting
with sensor , the tool is whole computerized and worked. Anthony Gomez, who is
the inventor and the Chairman and Managing Director of Australian AACE
Worldwide PTY Ltd. Company, said that there are no constant quotation for the
machine involved.
Figure 2.1 : Auto Wudhu Washers (AWW) model STD 707 (Rachmat et al., n.d.)
The important features of this machine is that this machine dries automatically,
clean and have no water spillage. Plus it prevents overcrowding in wash rooms,
ergonomic design, easy to use, low maintenance, easy installation (Rachmat et al.,
8
n.d.). The newest machine is (Figure 2.2) fully computerized so it generally does not
required a crane.
Figure 2.2 : Auto Wudhu Washers (AWW) model STD 708.
Sensor activated taps is used to control and dispensed electronically the water flow
for Auto Wudhu Washers (AWW) model STD 708.
2.3 Image Processing Technique
There are several technique of image processing which can be used in this machine
which it can detect the signal operating for which data is in visual such as in video
type. The expected result of the output image processing will be connected to the
image. It is describes the digital image processing or analog image processing. The
acquisition of images is referred to as imaging. Gabriele Moser (2009) has stated
that image processing technique is for creating a first array of pixels corresponding
to an input image and each pixel having an address and a data value and for creating
a second array of data values at addresses corresponding to the location of features
in said image.
9
2.4 Skin colour classification
The aim of the skin colour classification is to figure out the colour pixel of the non
coloured or colour image (Phung, Bouzerdoum, Member, & Chai, 2005). A better
skin colour pixel should achieved the range of all different in all skin (blackish,
yellowish, brownish, whitish, etc.) and promote many lightning situation as possible
(Nallaperumal et al., 2007). This part indicated the colour area and the algorithms
based on the classification that has been examined in the previous study. This
section describes the colour spaces and the classification algorithms which is
investigated in this study. Skin detection method is the image processing technique
consists of image acquisition or capturing the image, image pre-processing to
remove unwanted noise and image enhancement to enhance and contrast the image.
For hand skin detection consists of two type of method which are dynamic hand
gesture segmentation and static hand segmentation. Dynamic hand gesture
segmentation means the rate of the separate hand gestures from continuous image
order consisting the gestures (Shu Mo, Shihai Cheng, Xiaofen Xing, 2011). Static
hand segmentation is examined from image that comprising the gesture that have
been extracted from the video visualization.
2.4.1 Dynamic hand gesture segmentation
Bao Hong Zhao Xinggui (2010) defines that the gesture segmentation is the way to
examine and comparing the grade of the gesture segmentation that will be
consequences to the rate of recognition. Jisu Kim (2013) has suggested 4 ways in
proposed procedures which are head detection, back projection, hand rotation, and
hand detection.
Xiaoming Yin and Ming Xie (2001) have constructed a 3D reconstruction technique
to focused 3D hand gestures to examine the concept of matrix between cameras
from stereo hand images. M.W. Krueger was firstly proposed gesture-based
interaction as a new form of Human-Computer Interaction (HCI) in the middle of
the seventies. A real-time gesture system which can be used in place of the mouse to
resize and move the windows are presented by Kjelden and Kender.
10
The neutral network and segmented from background can be categorized based on
skin colour detection. Kahn constructed the Perseus system and it functioned to
differentiate the pointing gesture in a variety of characteristic Figure 2.3 shows the
classical image processing pipeline used for hand gesture recognition.
Figure 2.3 : Process of hand gesture recognition.
Qiu-yu Zhang (2008) has come with 3σ -principle of normal distribution for hand
gesture detection to suit with the problems. The with 3σ –principle is a method of
maximal between-class variable can be used to calculate the threshold value.
Extracting hand contour or shape based a specific threshold value is a process of
hand gesture segmentation. The maximal between-class variance is one of the
method in global threshold technology on the basis of the statistical theory.
11
Figure 2.4 : Example of an initial image.
Figure 2.5 : Example of using '3σ -principle' of normal distribution for hand gesture detection.
Mo-yi Zhang (2008) have come with a way of hand gesture segmentation and
tracking with appearance predicated on probability model. The statistical frame
difference method is used to obtain the data after the dividing of the image. Jian-
qiang Hu (2008) defined that the motion of the object will move in small scale in
order to modify the result in the segmentation . If somebody that poses the gestures
has moved a little bit, the image will remain fixed and steady. In Figure 2.5, grey
scale image is the statistic moving information image. The more the moving
information, the whiter it will be.
12
Figure 2.6 : Original hand images and skin probability distribution images.
Figure 2.7: Original hand images and statistic moving information.
The rate how much the current frame search window it will be examined by the
region's growth (Jian-qiang Hu,2008). For example if the region of the hand are
much greater than previous region, it must have a skin color noise. Figure 2.8 shows
caused by the region's growth.