• No results found

Computer Vision Based Barcode Reader For Halal JAKIM Verification System

N/A
N/A
Protected

Academic year: 2019

Share "Computer Vision Based Barcode Reader For Halal JAKIM Verification System"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

i

COMPUTER VISION BASED BARCODE READER FOR HALAL JAKIM VERIFICATION SYSTEM

MOHD NIZAR BIN ZAINUN

This Report Is Submitted In Partial Fulfillment of Requirements For The Bachelor Degree in Electronic Engineering (Computer Engineering)

Fakulti Kejuruteraan Elektronik dan Kejuruteraan Komputer Universiti Teknikal Malaysia Melaka

(2)
(3)

iii

“Saya akui laporan ini adalah hasil kerja saya sendiri kecuali ringkasan dan petikan yang tiap-tiap satunya telah saya jelaskan sumbernya.”

Tandatangan : ………..

Nama Penulis : MOHD NIZAR BIN ZAINUN

(4)

iv

“Saya/kami akui bahawa saya telah membaca karya ini pada pandangan saya/kami karya ini adalah memadai dari skop dan kualiti untuk tujuan penganugerahan Ijazah Sarjana

Muda Kejuruteraan Elektronik (Elektronik Komputer).”

Tandatangan : ………...

Nama Penyelia : NORHASHIMAH BINTI MOHD SAAD

(5)

v

(6)

vi

ACKNOWLEDGEMENT

Alhamdullillah, firstl I am grateful to Allah S.W.T because with His blessing, at last I have finished my Projek Sarjana Muda 2 (PSM 2) together with my thesis without any problem. To my beloved parent, Zainun Bin Barahim and Maimunah Binti Chin and the entire of my family members, thank you very much for all of their moral support during the entire of my learning journey in UTeM.

To my supervisor, Norhashimah bte Mohd Saad for her guidance, advices and her ideas during my PSM session thus making me improve my knowledge, thank you very much. To all of my friends that helping me out together with their moral support. Finally, to all individuals who involved in this PSM 2 which I have not mentions their name. Without all of you, this report will never finished succesfully.

(7)

vii

ABSTRACT

(8)

viii

ABSTRAK

(9)

ix

CONTENTS

CONTENT TITLE PAGES

PROJECT TITLE i

DECLARATION ii

DEDICATION v

ACKNOWLEDGEMENT vi

ABSTRACT vii

ABSTRAK viii

CONTENTS ix

LIST OF TABLE xiii

LIST OF FIGURES xiv

LIST OF ABBREVIATION xvi

I INTRODUCTION 1

1.1 Project Background 1

1.2 Problem Statement 2

1.3 Objective 3

1.4 Scope of Project 3

1.5 Methodology of Project 3

(10)

x

II LITERATURE REVIEW 5

2.1 Introduction 5

2.2 Catogories of Barcodes 7

2.2.1 One Dimensional Barcodes 7

2.2.2 Two Dimensional Barcodes 13

2.3 Available System For Halal Checking in Malaysia 14

2.4 Platform For Barcode Scanner 15

2.5 JAVA Language 16

2.6 JAVA Development Platform 17

III METHODOLOGY 18

3.1 Overview 18

3.2 Analysis 19

3.2.1 Research and Side Visit 19

3.2.2 Observation 20

3.2.3 View Existing Documentation 20

3.3 Scematic Design 20

3.3.1 Android Manifest.xml 21

3.3.2 Activity 22

3.3.3 Intent 23

3.3.4 SQLite Database 24

3.4 System Development 25

3.4.1 Development Tools 26

3.4.1.1 Adope Flash Builder 4.6 26

3.4.1.2 Eclipse IDE for Java Developers 27

3.4.1.3 Install ADT Plug-in and Android SDK 28

3.4.1.4 Manual Installation of the Android SDK 30

(11)

xi

3.4.3 Scan Barcode Activity 33

3.4.4 Halal Status Activity 35

3.4.4.1 Add Detail Database 35

3.4.4.2 Database Handler 35

3.4.4.3 Read Database 36

3.4.5 Link to Web Pages Activity 36

3.5 System Testing 37

3.5.1 Testing Approach 38

3.5.1.1 Functional Test 38

3.5.1.2 Unit Testing 38

3.5.1.3 Integration Testing 38

IV RESULT AND DISCUSSION 39

4.1 Overview 39

4.1.1 Use Case Diagram 40

4.1.2 Sequence Diagram 41

4.2 Graphical User Interface (GUI) 42

4.2.1 Function Button 42

4.2.1.1 Scan Barcode Button 43

4.2.1.2 Halal Status Button 44

4.2.1.3 Hyperlink Button 45

4.3 Analysis Result 46

4.3.1 Analysis Scanner To Different Condition 46

(12)

xii

V CONCLUSION AND RECOMMENDATION 51

5.1 Overview 51

5.2 Recommendation 53

5.2.1 Develop with online database storage 53 5.2.2 Compatible with all Android version 53 5.2.3 Compatible with other OS 53

REFERENCES 54

(13)

xiii

LIST OF TABLE

NO TITLE PAGE

4.1 Comparison barcode scanned (full images) 46 4.2 Comparison barcode scanned (upper part masked) 47 4.3 Comparison barcode scanned (bottom part masked) 48

(14)

xiv

LIST OF FIGURES

NO TITLE PAGE

2.1 The European Article Numbering (EAN)-13 barcode 6

2.2 Code 39 8

2.3 Code 93 8

2.4 Code 128 9

2.5 EAN 13 9

2.6 EAN 14 10

2.7 Codabar 11

2.8 UPC (Universal Product Code) 11

2.9 Application in Google Store 14

2.10 Barcode scanner 15

2.11 Barcode pen-scanners 15

3.1 Waterfall model used for this project 19

3.2 Manifest file 21

3.3 Method which loads the view of the xml 22

3.4 Intent Object 23

3.5 Database Management Systems 24

3.6 SQLite database code 25

3.7 Adope Flash Builder 4.6 26

3.8 Eclipse Java used for create this project 27

3.9 Configure for SDK 28

(15)

xv

3.11 Install packages 29

3.12 Android Preferences 30

3.13 SDK Manager to Install Packages 31

3.14 SDK manager download 31

3.15 Main Screen Applications 32

3.16 Code for Each Button 33

3.17 Code for Connect class of Intengrator.java 34

3.18 Code for Connect IntenResult.java 34

3.19 Add Detail Database 35

3.20 Internet Manifest Code 36

3.21 Code in MainActivity.java 36

4.1 Perspective when application running 40

4.2 Consecutive action during usual application run 41

4.3 Main Screen Interface 42

4.4 Function of Scan Button 43

4.5 Function for Halal Status Button 44

(16)

xvi

LIST OF ABBREVIATION

JAKIM - Jabatan Kemajuan Islam Malaysia

1D - One dimensional

2D - Two Dimension

SQLite - Structured Query Language EAN - European Article Numbering UPC - Universal Product Code JVM - Java Virtual Machine FDS - Flex Data Services

AIR - Adobe Integrated Runtime

API - Application Programming Interface SDK - Software Development Kit

ADT - Android Developer Tools GUI - Graphical User Interface

IDE - Integrated Development Environment

OS - Operation System

UI - User Interface

CPU - Central Processing Unit

PIN - Personal Identification Number

PC - Personal Computer

IDE - Integrated Development Environment

(17)

1

CHAPTER 1

INTRODUCTION

1.1 Project Background

Nowadays, almost all products have its unique barcode numbers. It represents

loads of information about a product. Many people familiar with halal food issue. Other

popular applications of bar code include the logistic industry and domestic consumer

food monitoring. The android application has the potential of changing the consumer

business landscape in the near future. Also it has opened up exciting new channels for

any type of products identification using mobile technology. Meanwhile, Halal

consumer products have become a crucial concern that affects Malaysian's Muslims as

well as around 1 .5 billion Muslim throughout the world. The word Halal is an Arabic

term meaning "permissible". It is important to understand that Halal is a unique

(18)

2

matters of daily life. In Malaysia, Jabatan Kemajuan Islam Malaysia (JAKIM) is

responsible for Halal certification. It covers consumer products such as foods, drinks,

cosmetics, etc. Each of these must pass the JAKIM requirements for Halal Certification.

JAKIM department was provided SMS (Short Message System) to user know about the

food status only send the food barcode and get the response in real time.

For this application from this project (Computer Vision Based Barcode Reader

for Halal Jakim Verification System), user can know the food status only scan the

barcode image to capture by camera .To make food reorganization processes become

more effective, this proposed system is developed to make more systematic a

consistence. It also keeps all the data about the food on the database.

By developing this system, it can upgrade to replace the current system for

example it is provide with database to store all the information about the food. The

barcode will be applied for this system and the barcode which capture by smart phones

camera to give the food status .With the barcode on food, the identification of it will be

more efficient and systematic.

1.2 Problem Statement

A lot of the existing products in the market use Halal Malaysia label without

getting the certification from JAKIM. Thus, the halal status cannot be trusted just by

looking at the label of product. In addition to this problem, some products still use the

Halal Malaysia label even though the certification has expired. JAKIM has provided

e-halal using web-portal and SMS to ascertain the e-halal status. However, both systems

have limitations such as the need of internet access for the web-portal, consumers must

remember the SMS number for verifying via SMS using mobile phone. Both systems are

costly and need to key-in the product barcode manually for authentication. This system

helping consumers to overcome these limitations by verifying halal status verification

(19)

3

1.3 Objectives

The objective of this project:

1. To design barcode recognition system using image processing algorithms

2. To analyze the recognition rate of the image processing algorithm.

3. To construct Halal system verification system using the barcode images

captured.

1.4 Scope of Project

The scope of the project is as following:

1. Type of barcode use is 1D barcode.

2. This project concentrates on the process of detection barcode and calls the data.

3. Eclipse software will be used to develop the algorithms barcode scanner and

application.

4. SQLite (Structured Query Language) will be used to manage the details data.

1.5 Methodology of Project

• Analysis some related project, study and analysis the existing project. • Design specification of detail framework that chooses in Android. • System development of project.

(20)

4

1.6 Thesis Organization

This report contains five chapters. Chapter one describe about introduction of

Computer Vision Based Barcode Reader For Halal Jakim Verification System, problem

statement of the project, objective of the project, the purpose of the project that describe

the reason for developing this project, scope of the project and organization of the

report.

Chapter two is literature review about the barcode system available, types of

barcode, and Halal Jakim system available. This chapter review on previous research

about the topic related to the project. Various methods and approaches that related to the

project is discussed and reviewed.

Chapter three explains the theory of this project. This project theory includes

Java Language, Android Architecture, SQLite and algorithms. This chapter will review

the basic theory about application software, language, and management software.

Chapter four explains the methodology of the project. This project will used Java

Android algorithms techniques to read the barcode and use the SQLite database

management system to store all data. The flow chart of the project and the algorithms

use is explained in this chapter.

Chapter five is about results of the Java Android simulation and discussion

regarding the results. Analysis about scan the barcode in different condition will be

discussed. Lastly, chapter six will conclude the project findings and recommendation for

(21)

5

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

A barcode is an optical machine-readable representation of data relating to the

object to which it is attached. Originally barcode are systematically represented data by

varying the widths and spacing’s of parallel lines, and may be referred as linear or

one-dimensional (1D). Later, they evolved into rectangles, dots, hexagons and other

geometric patterns in two dimensions (2D). Although the 2D systems use variety of

symbols, they are generally referred to as barcodes as well. Barcodes are “printed

horizontal strips of vertical bars used for identifying specific items”[1]

.

Barcodes

originally were scanned by special optical scanners called barcode readers. Later,

scanners and interpretive software became available on devices including desktop

printers and smart phones. Many mobile applications that incorporate barcode reader

have been developed in various areas such as blood bank [2], product recommendations

(22)
[image:22.595.245.396.156.274.2]

Figure 2.1

The European Article Numbering (EAN)

tagging retail goods

enormous benefits to consumer and business. As a result, the process of capturing

product data (price, etc.) is faster and more accurate. Mistakes are minimized and

managing inventory has been much easier.

EAN-13 barcode has 13 numeric characters, al

or three characters are the country code.

followed by either nine or ten characters for manufacturer code and product code. The

13t character of the EAN

Figure 2.1 : European Article Numbering (EAN)

The European Article Numbering (EAN)-13 barcode is used internationally for

[5] (figure 2.1). The usage of barcode technology has pro

enormous benefits to consumer and business. As a result, the process of capturing

product data (price, etc.) is faster and more accurate. Mistakes are minimized and

managing inventory has been much easier.

13 barcode has 13 numeric characters, also known as digits. The first two

or three characters are the country code. Depending on the length of the country

either nine or ten characters for manufacturer code and product code. The

13t character of the EAN-13 barcode is the checksum digit [6].

6

European Article Numbering (EAN)-13

13 barcode is used internationally for

(figure 2.1). The usage of barcode technology has provided

enormous benefits to consumer and business. As a result, the process of capturing

product data (price, etc.) is faster and more accurate. Mistakes are minimized and

so known as digits. The first two

Depending on the length of the country code; it

(23)

7

2.2 Categories of Barcode

Barcodes have now become an essential part of almost company. It is rarely to

find a product without a barcode tag. Different types of barcodes are used for different

purposes in business sectors. Typical usage of barcodes include tracking sale and

purchase of large number of items in an inventory, pasted on sports tickets which allow

one to enter a sports arena and often placed on gift tokens that when decoded tells

which gift that token corresponds.

2.2.1 One Dimensional Barcodes

One dimensional or linear barcodes are commonly referred as first generation

barcodes. A variety of 2D barcode shave been designed that are much better suited for

camera acquisition[7],[8], but for the next several years 1D barcode will remain the

dominant type of label for most packaged goods. These barcodes consist of vertical lines

at specific gaps resulting in a particular pattern. There has been a variety of research

done on algorithms for reading 1D barcodes, which we survey, briefly here. Most past

work has dealt with scan line data (typically acquired by a laser scanner), using

waveform analysis, debluring and other signal processing techniques to detect edges

[9],[10],[11]. Hardware scanners are used to scan these patterns and decode the

information stored in those particular patterns. These barcodes are also commonly

(24)

Code 39

Code 39 (also

outside the retail area and is read by most scanners, although it is not as compact as

Code 93 or Code 128 (Figure 2.2). The normal Code 39 scheme encodes both numbers

and upper case letters, and

self-checking symbology

Some users mistake that inter

not the same size as in another barcode representing the same characters.

Code 93

Code 93 (Figure 2.3) is a variable length, continuous symbology using four

element widths with each character consisting of three bars and three spaces. Code 93

was designed to complement Code 39 and is a more compact code than the latter. Code

93 is not a self-checking symbology.Code 93 symbols include two Mod 47 check

[image:24.595.234.408.180.243.2]

characters.Special codes are used to allow full ASCII characters to be incorporated, Figure 2.2: Code 39

Code 39 (also known as 3 of 9) is by far the most common barcode symbology

outside the retail area and is read by most scanners, although it is not as compact as

Code 93 or Code 128 (Figure 2.2). The normal Code 39 scheme encodes both numbers

and upper case letters, and was the first alphanumeric symbology. Code 39 is a discrete,

checking symbology - so the gap between ciphers may be larger than a unit space.

Some users mistake that inter-cipher gap for a space and become concerned because it is

in another barcode representing the same characters.

Figure 2.3: Code 93

Code 93 (Figure 2.3) is a variable length, continuous symbology using four

element widths with each character consisting of three bars and three spaces. Code 93

gned to complement Code 39 and is a more compact code than the latter. Code

checking symbology.Code 93 symbols include two Mod 47 check

Special codes are used to allow full ASCII characters to be incorporated, 8

known as 3 of 9) is by far the most common barcode symbology

outside the retail area and is read by most scanners, although it is not as compact as

Code 93 or Code 128 (Figure 2.2). The normal Code 39 scheme encodes both numbers

was the first alphanumeric symbology. Code 39 is a discrete,

so the gap between ciphers may be larger than a unit space.

cipher gap for a space and become concerned because it is

in another barcode representing the same characters.

Code 93 (Figure 2.3) is a variable length, continuous symbology using four

element widths with each character consisting of three bars and three spaces. Code 93

gned to complement Code 39 and is a more compact code than the latter. Code

checking symbology.Code 93 symbols include two Mod 47 check

Figure

Figure 2.1Figure 2.1 : European Article Numbering (EAN)European Article Numbering (EAN)-13
Figure 2.2: Code 39

References

Related documents

Watch the order flow in the Time & Sales Large orders indicate Retail Interest. Orders in Green are at the ASK price Orders in White are in between BID/ASK Orders in Red are at

Si Sharlene ay higit na nasisiyahan kapag kasama niya ang mga kaibigan at ibang tao kaysa siya 30V. Si Sharlene ay higit na nasisiyahan kapag kasama niya ang mga kaibigan at ibang

provisions of a charitable remainder annuity trust are that a sum certain (which must be at least five percent of the initial fair market value of the property placed in the trust)

AN ACT relating to the City of Reno; making various changes to the provisions of the Charter of the City of Reno relating to the Mayor, Assistant Mayor, City Council, City Manager

Now before we head into the world of Piptastic trading I’d just like to pause & quickly show you how 10pips a day can generate a healthy income over time.. What we use here is

If any prospect (at any time during the leasing process) says that they have a service or assistance animal, inform them that they will need to fill out a ‘request for reasonable

Q35: Thinking now about what you spent this money on. In the last 12 months when you have got extra cash out using EFTPOS in an ACT …** CATI TO CHECK Q29 AND INSERT ONLY THOSE

The aim of this study was: to analyse the relationship among spousal support, social-cognitive vari- ables regarding SMBG (intentions, attitudes, subjective norms, per- ceived