Nutrient Fact Processing Tool.

NUTRIENT FACT PROCESSING TOOL

NURBALQIS BINTI YUSOFF

This report is submitted in partial fulfilment of the requirements for the
Bachelor of Computer Science (Artificial Intelligent)

FACULTY OF INFORMATION AND COMMUNICATION TECHNOLOGY
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
2012

© Universiti Teknikal Malaysia Melaka

DECLARATION

I hereby declare that this project report entitled

NUTRIENT FACT PROCESSING TOOL

is written by me and is my own effort and that no part has been plagiarized
without citations.


STUDENT: -------------------------------(NURBALQIS BINTI YUSOFF)

Date : - - -

SUPERVISOR : _ _ _ _ _ _ _ _ __ ___ _ _ _ _ _ Date : _ __
(DR. NORZIHANI BT. YUSOF)

© Universiti Teknikal Malaysia Melaka

ii

DEDICATIONS

To my beloved parents, who have been my constant source of inspiration.
Without your love and support this project would not have been made possible.

© Universiti Teknikal Malaysia Melaka

iii


ACKNOWLEDGEMENT

I would like to thank Dr. Norzihani bt. Yusoffor giving assistant to complete this
project successfully.

I would also like to thank my beloved parents who have been giving me support and
motivation throughout my project.

© Universiti Teknikal Malaysia Melaka

iv

ABSTRACT

As the world shifted to the modern age, there will be more food packet delivered
within nutritional fact for the consumer's convenience. However, consumers tend to
eat whatever kind of food without taking note the nutritional fact provided within
food packet. This is because nutritional facts provided by food manufacturers was
quite complicated and hard to be understood by consumers. This can be one of the

reasons why obesity problem triggered in Malaysia as consumer having lack of
knowledge about nutritional fact served in food packet consumed.
So providing a solution to this problem, I would like to propose a ' Nutrient Fact
Processing Tool' that is very crucial for the packet food consumers. In this tool, there
will be an additional feature provided which is the body mass index calculator. This
calculator will enable food consumer to consider their body mass index within the
content of nutrients appeared on the food packet. So far, there is no effort had been
carried out to meet this main objectives which is to provide a tool which capable in
processing image of nutritional fact on food packet. By that, packet food consumer
will be more alert about their own food consumption.

© Universiti Teknikal Malaysia Melaka

v

ABSTRAK

Apabila dunia semakin menganjak ke zaman moden, akan lebih banyak makanan
berpaket yang dilengkapi fakta nutrisi


dikeluarkan untuk kemudahan pengguna.

Walau bagaimanapun, kebanyakan pengguna lebih selesa menikmati makanan
berpaket tanpa mengambil kira fakta nutrisi yang disediakan tersebut. Ini berpunca
daripada struktur fakta nutrisi itu sendiri yang tidak mesra pengguna dan sukar untuk
ditafsirkan oleh pengguna. Ini merupakan salah satu sebab mengapa masalah obesiti
muncul di Malaysia yang mana berpunca daripada pengguna makanan berpaket yang
tidak mengambil berat akan jumlah nutrisi yang diambil bagi setiap hidangan.

Lantaran masalah tersebut, saya rnencadangkan satu 'Pemproses Fakta Nutrisi' yang
akan menjadi satu alat penting untuk pengguna makanan berpaket. Di dalam alat ini,
akan ada ciri-ciri tambahan iaitu 'Kalkulator Indeks Jisim Tubuh'. Kalkulator ini akan
membolehkan pengguna rnengira indeks jisim tubuh mereka. Setakat ini, tiada usaha
yang dijalankan oleh pihak lain untuk menghasilkan satu alat serupa yang mampu
memproses fakta nutrisi pada paket makanan. Diharap dengan usaha saya kali ini,
para pengguna akan lebih jelas dan prihatin terhadap fakta nutrisi yang disediakan
derni menjamin pengambilan makanan yang sesuai dengan keperluan tubuh semasa.

© Universiti Teknikal Malaysia Melaka


v

TABLE OF CONTENTS

CHAPTER

PAGE

SUBJECTS

DECLARATION

CHAPTER I

CHAPTER II

DEDICATION

ii


ACKNOWLEDGEMENT

iii

ABSTRACT

iv

TABLE OF CONTENT

vi

INTRODUCTION
1.1 Project Background

2

1.2 Problem Statements

3


1.3 Objectives

3

1.4 Scope

4

1.5 Project Significant

4

1.7 Expected Output

5

1.8 Conclusion

5


LITERATURE REVIEWAND PROJECT
METHODOLOGY
2. 1 Introduction

6

2.2 Fact and Finding

7

2.2.1

Domain

7

2.2.2

Existing System


8

2.2.3

Technique

8

2.3 Project Methodology

© Universiti Teknikal Malaysia Melaka

12

vi

2.3.1 Approach

12


2.3.2 Model

13

2.4 Project Requirement

17

2.4. 1 Software Requirement

18

2.4.2 Hardware Requirement

19

2.4.3 Other Requirement

19


2.5 Project Schedule and Milestone

20

2.6 Conclusion

23

CHAPTER III ANALYSIS
3.1 Introduction

24

3.2 Problem Analysis

25

3.3 Requirement Analysis

26

3.3.1 Data Requirement

27

3.3.2 Functional Requirement

28

3.3.2. 1 Detection

29

3.3.2.2 Calculate

29

3.3.3 Non-Functional Requirement

30

3.3.3.1 Performance

30

3.3.3.2 Size of Data

31

3.4 Conclusion

CHAPTER IV

31

DESIGN
4.1 Introduction

32

4.2 High-Level Design

33

4.2.1 System Architecture

33

4.2.2 User-Interface Design

34

4.2.3 Navigation Design

34

4.2.4 Input Design

41

4.2.5 Output Design

42

© Universiti Teknikal Malaysia Melaka

vii

4.3 Detail Design
4.3. 1 Software Specification

43
43

4.3.1.1 Load Button

45

4.3.1.2 Select Button

45

4.3.1.3 Crop Button

46

4.3.1.4 Analyze Button

47

4.3.1.5 Reset Button

49

4.3.1.6 Calculate BMI Button

49

4.3.1.7 Reset BMI Button

50

4.4 Conclusion

51

CHAPTER V IMPLEMENTATION

5.1 Introduction
5.2 Software Development Environment
5.3 Software Configuration Management

52
53
55

5.3.1 Configuration Environment Setup

55

5.3.2 Version Control Procedure

56

5.4 Implementation Status

57

5.5 Conclusion

59

CHAPTER VI TESTING

6. 1 Introduction

60

6.2 Test Plan

61

6.2.1 Test Organization

61

6.2.2 Test Environment

62

6.2.3 Test Schedule

63

6.3 Test Strategy
6.3.1 Classes of tests.

© Universiti Teknikal Malaysia Melaka

63
65

viii

6.4 Test Design
6.4.1 Test Description

67

6.4.2 Test Data

69

6.5 Test Results and Analysis

70

6.6 Conclusion

72

CHAPTER VII PROJECT CONCLUSION
7.1 Observation on Weaknesses and Strengths

73

7.2 Propositions for Improvement

75

7.3 Contribution

75

7.4 Conclusion

76

REFERENCES

77

APPENDICES

78

© Universiti Teknikal Malaysia Melaka

1

CHAPTER I

INTRODUCTION

As the world advance to the modem age, there will be more food packet
delivered within nutritional fact for the consumer' s convenience. Nowadays,
consumers tend to eat whatever kind of food without take note about the nutritional
fact provided within food packet. However, nutritional facts provided by food
manufacturer was quite complicated and hard to be understand by consumers. This
can be one of the reasons why obesity problem triggered in Malaysia as consumer
having lack of knowledge about nutritional fact served in food packet consumed.
So providing a solution to this problem, I would like to propose a nutrient fact
processor that is very crucial for the packet food consumers. So far, there is no effort

© Universiti Teknikal Malaysia Melaka

2

has been carried out to meet this main objectives which is to provide a tool which
capable in processing image of nutritional fact on food packet. This tool will provide
a detail about nutrients served within food packet.

1.1 Project Background

Matlab R2007 will be used to design and code Nutrient Fact Processing Tool.
This tool will be able to process image of nutritional fact captured on food packet
and release details about the nutrient served within food. The main purpose of the
Nutrient Fact Processing Tool is to visually expose some of the food ' s nutritional
strengths and weakness. At the end of this indicator is a Completeness Score that
ranges from 0 to 100. This score tell how close the food is to filling requirement for
all of these essential nutrients.

© Universiti Teknikal Malaysia Melaka

3

1.2 Problem Statements

There are few problems about nutritional fact on the current food packet which raises
my awareness to design this Nutrient Fact Processing Tool. Firstly, nutritional facts
display on every food packet was quite difficult to be read by food consumer.
Secondly, food consumer cannot acknowledge how much nutrient taken per serving
and how much nutrient need to be consumed on the next me.

1.3 Objectives

From this project, I would like to carry out the following aims which are;
l. To enable packet food consumer acknowledge how much nutrient taken by

them per serving and how much nutrient need to be served on the next meal.
2. To enable packet food consumer to acknowledge their current Body Mass
Index (BMI) and take precaution to consume packet food based on their BMI.

© Universiti Teknikal Malaysia Melaka

4

1.4 Scope

The scope of my project will be focused on the usage of this Nutrient Fact
Processing Tool and its business rule, software that will be used in order to build this
project.

1.5 Project Significant

In this project, I would like to do research on Nutrient Fact Processing Tool.
The primary outcome of this project will be a complete and comprehensive solution
for the nutrient intake. This solution will be almost unique because of the fact' that
my approach to the input gathering is different from almost all sorts of such project.
This would lead my solution to ensure its place in the market as a unique product. I
will see the system from the point of view nutritionist and food consumer. So, a
combination of views and observation will be able to confirm some of the
weaknesses in the project.

© Universiti Teknikal Malaysia Melaka

5

1.6 Expected Output

This system should be able to process identified images and do intelligent
task in order to produce the percentage of nutrition fact by using some algorithm
implemented with digital image processing that suit this case. This system will make
decision about the input of Body Mass Index (BMI) of a person with the content of
nutrition of the food packet.

1. 7 Conclusion.

The aim of this project is to design and develop a system a system that could
count the petcentage of nutrition content to enable people to beware about the food
content when deal with fast food and tendency of unethical food intake. In future
significance, some improvement can be added to make this such system to be more
intelligently, effectively functional and can be implemented in more wide area.
I hope at the end of this project, will be able to help packet food consumer to manage
their nutrients intake efficiently. I also hope that, the existence of this tool later on,
food consumer will not experience any problem in understanding the nutrient fact in
detail.

© Universiti Teknikal Malaysia Melaka

6

CHAPTER II

LITERATURE REVIEW AND PROJET METHODOLOGY

2.1 Introduction

In software development, it will go through a several phases of techniques
and methodology in order to achieve the goals or the objectives of the project. With
different resources, there are several methodology phases that will go through. In this
project, Matlab R2007b software and the tools inside the software has been chosen to
develop the system. In this chapter, the discussions are about the fact and findings,
project methodology, project requirement, and project schedule and milestone.

© Universiti Teknikal Malaysia Melaka

7

2.2 Facts and Findings

Fact and findings is references or past researches that have been found in the
internet, book and other documentation.

2.2.1 Domain

In every project, it is important to know what domain is it in. For this project,
the aim is to develop a system to read the nutrition percentage in food packet based
on Body Mass Index (BMI) . The system will be used by everybody especially who
concern about their food intake. This system will be compared the value of food
nutrition with their Body Mass Index (BMI) thus enable food consumer to limit their
food intake. By that, food consumer can manage how many packet of food need to
consume based on the result.

© Universiti Teknikal Malaysia Melaka

8

2.2.2 Existing System

There a lot of similar system that has been develops for text detection.
Considerable of Plate Number Recognizer is based on real-time image processing. In
this project, the system is developed based on digital image processing. One of them
is Traffic System (Traf- Sys Inc,). It will record the traffic and counting in real time.
Their goal is to help the clients achieve higher profits by using traffic
counting systems data along with the other key metrics that have always been
analyzed in running a business. This way, their customers can find out how many
sales they are getting in relation to the traffic, how much staff needed, how much
security staff, etc. Their customers can even use the information to team with
sponsors-by knowing exactly how many people go by a kiosk or display.

2.2.3 Technique

In this project, the artificial intelligence technique that is Edge Detection will
be used to read the different texture of image. Initially, pattern recognition problems
were often solved by linear and quadratic discriminant or the (non-parametric) knearest neighbour classifier. In the mid-eighties back-propagation learning algorithm

© Universiti Teknikal Malaysia Melaka

9

was introduced for neural networks. Since then, neural network has obtained a
widespread used in image processing. The current use of ANNs in image processing
exceeds the aforementioned traditional applications. The role of feed-forward ANNs
and SOMs has been extended to encompass also low-level image processing tasks
such as noise suppression and image enhancement. Hopleld ANNs were introduced
as a tool for fmding satisfactory solutions to complex (NP-complete) optimization
problems. This makes them an interesting alternative to traditional optimization
algorithms for image processing tasks that can be formulated as optimization
problems. The different problems addressed in the field of digital image processing
can be organised into what have been chosen to call the image processing chain.
Below is the following distinction between steps in the image processing chain, see
Figure 2.1.
Noise suppression
Compression
Feature extraction
Deblurring
Image enhancement
Edge detection

Preprocessing

Texture segregation Template miJtching
Feature-based
Colour recognition
Clustering
recognition

Image
understanding

Data reduction

Graph matching
Automatic thresholding

Scene aniJiysis
Object arrangement

Optimisation

Figure 2.1: Image processing chain

© Universiti Teknikal Malaysia Melaka

10

I. Preprocessing/filtering
Operations that give as a result a modi I ed image with the same
dimensions as the original image (e.g., contrast enhancement and
noise reduction).

2. Data reduction/feature extraction
-

Any operation that extracts signilcant components from an image
(window). The number of extracted features is generally smaller than
the number of pixels in the input window.

3. Segmentation
-

Any operation that partitions an image into regions those are coherent
with respect to some criterion. One example is the segregation of
different textures.

4. Object detection and recognition.
-

Determining the position and, possibly, also the orientation and scale
of speci I c objects in an image, and classifying these objects.

5. Image understanding.
-

Obtaining high level (semantic) knowledge ofwhat an image shows.

© Universiti Teknikal Malaysia Melaka

11

6. Optimization.
Minimization of a criterion function which may be used for, e.g.,
graph matching or object delineation. Optimization techniques are not
seen as a separate step in the image processing chain but as a set of
auxiliary techniques, which support the other steps. Besides the actual
task performed by an algorithm, its processing capabilities are partly
determined by the abstraction level of the input data. It has been
distinguish between the following abstraction levels:

Abstraction Level

Description
The intensities of individual pixels are

Pixel level

provided as input to the algorithm.
A set of derived, pixel-based features

Local feature level

constitutes the input.
The relative location of one or more

Structure (edge) level

perceptual features (e.g. , edges, comers,
junctions, surfaces, etc.)
Properties of individual objects.

Object level

© Universiti Teknikal Malaysia Melaka

12

The mutual order and relative location of
Object set level

detected objects.
A complete description of the scene

Scene characteristic

possibly including lighting conditions,
context and etc.

2.3 Project Methodology

Methodology used for this project is Edge Detection as the project
methodology. The following topic will explain more details about the methodology.

2.3.1 Approach

Since using Edge Detection as the project methodology, a method to design
and build large programs with a long lifetime. Edge Detection is often part of the
development of small scale systems.

© Universiti Teknikal Malaysia Melaka

13

This methodology is closer to the way problems appear in life. In terms of
object or concept and relations between concepts, it is easy to modelling simplified
with object-oriented because this system have objects and relation. This methodology
need some diagram to describe the flow of system such as use case diagram, class
diagram and sequence diagram.

Object-oriented analysis and design is an approach that models a system as a group
of interacting object. Each object represents some entity of interest in system being
modelled and is characterized by its class, state and behaviour.

2.3.2 Model

The Nutrient Fact Processing Tool project will be using prototyping model. It
is a series of process that develop an information system which gathers information
and gives the related output. This model is quite simple or easy to implement and
even though there are any changes and correction during developing a system.

© Universiti Teknikal Malaysia Melaka

14

Planning System/Analysis
Requirement

Design

l-....+

Maintenance

Coding/Developing

4

Testing

4

Implementation

Figure 2.2: Prototyping Model

The first phase ofthe project is planning and analysis. Starting with
planning, this is the phase which is need brainstorming, configure and understand
how the project looks alike to complete the tasks. In this phase, some efforts have
been work on to study and solve of the problem statement. As a result, this phase is
to achieve objective of system development. Besides, all the data and information
that needed in this project has been gathered.

© Universiti Teknikal Malaysia Melaka