i computer vision based barcode reader for halal

Download i COMPUTER VISION BASED BARCODE READER FOR HALAL

Post on 21-Jan-2017

215 views

Category:

Documents

2 download

Embed Size (px)

TRANSCRIPT

  • 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

    June 2014

  • ii

  • 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

    Tarikh : 6 JUNE 2014

  • 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

    Tarikh : 6 JUNE 2014

  • v

    To my beloved parents Zainun Barahim and Maimunah Chin, my family and all my

    fellow friends.

  • 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.

    Thank you.

  • vii

    ABSTRACT

    At present, many people are looking for applications that can facilitate and

    launch their daily life. The industry technology began to pay more attention to barcode

    application for domestic users need. This thesis describes an android application for

    Muslims to identify the Halal Status (prepared in accordance to Islamic law) of the

    product. The barcode images is need for preprocessing in order to extract the barcode

    into the database and also barcode recognition process. A Computer Vision Based

    Barcode Reader For Halal Jakim Verification System is a low cost barcode reader,

    which is develop by using Android developer. Barcode are a class of the simplest printed

    patterns that can be reliably recognize by a computer vision or an any operating system.

    These codes consist of sequence of parallel, light and dark stripes printed on papers.

    This is a real time application that requires high processing time. This is the main reason

    for using the language JAVA for the development this project.The objective is supported

    by several sub-objectives, namely to gain knowledge of Java Eclipse, Android versions

    and able the development of an algorithm for Smartphone on Android. This project

    consists of analysis, scematic design, system development and testing. The purpose is to

    determine the basic flow and system testing of the barcode scanner. The halal jakim

    database is also develop in this system. In conclusion, a new system for Halal status

    checking was develop for new android application.

  • viii

    ABSTRAK

    Pada masa kini, ramai orang yang mencari aplikasi yang dapat memudahkan dan

    melancarkan kehidupan harian mereka. Teknologi industri mula menumpukan aplikasi

    barcode. Tesis ini menerangkan applikasi android untuk umat Islam mengenalpasti

    status Halal (sesuai dengan undang-undang Islam) sesuatu produk. Gambar kod bar

    digunakan untuk teknik preprocessing untuk mengekstrak kod bar tersebut ke dalam

    pengkalan data dan proses pengecaman. Sistem Visual Komputer Berdasarkan Pembaca

    kod bar untuk Pengesahan Status Halal Jakim merupakan sistem kos rendah yang dibina

    menggunakan pembina android. Kod bar adalah bahan yang paling mudah dicetak oleh

    komputer atau mana-mana sistem operasi. Kod-kod ini terdiri dari rangkaian selari,

    garis-garis terang dan gelap dicetak di atas kertas. Ini adalah aplikasi masa nyata dan

    memerlukan masa proses yang tinggi. Sistem ini menggunakan perisian JAVA dalam

    melaksanakan projek ini. Objektif disokong oleh beberapa sub-objektif, iaitu menimba

    ilmu mengenai Java Eclips,versi android dan algorithma untuk Android. Projek ini

    terdiri daripada analisis, reka bentuk skematik, pembangunan system dan ujian.

    Tujuannya adalah untuk menentukan aliran dan sistem ujian asas pengimbas kod bar.

    Pengkalan data halal JAKIM juga dibina di dalam sistem. Kesimpulannya, system baru

    untuk semakan status halal telah dilaksanakan.

  • 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

    1.6 Thesis Organization 4

  • 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

    3.4.2 Main Screen Activity 32

  • 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

    4.3.2 Performance Analysis 50

  • 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

  • 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

    4.4 Over Light Condition 49

  • 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 Sy

Recommended

View more >