0% found this document useful (0 votes)
18 views45 pages

Calorimeter Application: Bachelor of Technology IN Computer Science and Engineering SESSION: 2020 - 21

This document is a project report on developing a calorimeter application to measure calories from food images. It discusses image processing techniques like pre-processing, segmentation, feature extraction and SVM classification to detect various foods and estimate their calorie content. The system uses thumb calibration to estimate portion sizes in food images and calculates calories. It presents the methodology, experimental results and concludes with scope for future improvements to increase accuracy of calorie measurements.

Uploaded by

shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views45 pages

Calorimeter Application: Bachelor of Technology IN Computer Science and Engineering SESSION: 2020 - 21

This document is a project report on developing a calorimeter application to measure calories from food images. It discusses image processing techniques like pre-processing, segmentation, feature extraction and SVM classification to detect various foods and estimate their calorie content. The system uses thumb calibration to estimate portion sizes in food images and calculates calories. It presents the methodology, experimental results and concludes with scope for future improvements to increase accuracy of calorie measurements.

Uploaded by

shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

A

Project Report on

Calorimeter Application
(Measuring Calories from Food Image)
Submitted in partial fulfillment of the
requirements for the awards of the degree of

BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
SESSION : 2020 – 21

Submitted To: Submitted By:


Dr. Rohit kr. Singhal Sumiksha Gupta
Head Of Department 17EIACS075
Department of CSE

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

INSTITUTE OF ENGINEERING AND TECHNOLOGY


MIA, ALWAR – 301001(RAJ.), INDIA
Candidate’s Declaration

We hereby declare that the work, which is being presented in this report, entitled “CALORIMETER
APPLICATION (Measuring Calories From Food Image)” in fulfillment for the award of Degree of “Bachelor
of Technology” in department of Computer Science & Engineering, Institute of Engineering and
Technology, Alwar affiliated to Rajasthan Technical University, Kota is a record of our own
investigations carried under the guidance of Mrs. Deepika Upadhyay, Department of Computer Science &
Engineering, IET Alwar. We have not submitted the matter presented in this report anywhere for the award
of any other Degree.

SUMIKSHA GUPTA

Enrollment No.: 17EIACS075

Department of Computer Science & Engineering

PROJECT GUIDE
Mr. Anil Rao
Department of Computer Science Engineering
Institute of Engineering & Technology, Alwar
CERTIFICATE
This is to certify that the Project work entitled “CALORIMETER APPLICATION (Measuring Calories
From Food Image)” submitted by Sumiksha Gupta in fulfillment for the requirements of the award of
Bachelor of Technology Degree in Computer Science & Engineering at IET, Alwar is an authentic work
carried out by them under my supervision and guidance. To the best of my knowledge, the matter
embodied in the project has not been submitted to any other University / Institute for the award of
any Degree.

PROJECT GUIDE

Mr. Anil Rao

Department of Computer Science Engineering

Institute of Engineering & Technology, Alwar

ii
ABSTRACT

As people across the globe are becoming more concerned in watching their weight,
eating more healthy and avoiding obesity, a system that can measure calories in
everyday meals can be very useful. Obesity treatment requires constant monitoring
and a rigorous control of diet, thus it is necessary to measure daily calorie intake.
Obesity treatments have been the focus of a large number of recent studies. Therefore,
measuring food intake each day is considered an important step in the success of a
healthy diet. Food detection, classification and analysis have been the topic of in-depth
studies for a variety of applications related to eating habits and dietary assessments.
The food calorie measurement system can help patients and dietitians to measure and
manage daily food calorie intake. This system is built on food image processing via a
special calibration technique, the system records a photo of the food to measure the
consumption of calorie components. The input is the food image. The system then
processes and classifies the images to detect the type of food and portion size, then
uses the information to estimate the number of calories in the food. The estimation
and calculation of the amount of calories in the image is an essential step in our
system. By using thumb calibration technique FRS (food recognition system) can
estimate the existing calories with a high level of accuracy.
Keywords: Feature Extraction; Feature Classification; RBF (Radial Basis
Function); SVM (Support Vector Machine); Calorie Measurement, Food
recognition system

iii
ACKNOWLEDGEMENT

It is indeed with a great pleasure and immense sense of gratitude that we acknowledge the help of these
individuals. I am highly indebted to our Head of the Department of Computer Science and
Engineering, Dr. Rohit Kumar Singhal, Institute of Engineering and Technology for the facilities
provided to accomplish this main project.

I feel elated in manifesting our sense of gratitude tour internal project guide Mr. Anil Rao, Faculty
from IET Alwar. He has been a constant source of inspiration for me and I am very deeply thankful
to him for his support and valuable advice.

I extremely grateful to our Departmental staff members, Lab technicians and Non-teaching staff
members for their extreme help throughout our project.

Finally I express our heartful thanks to all of our friends who helped us in successful completion of
this project.

iv
Contents

Chapter 1 Introduction 1
1.1 Motivation 1
1.2 Scope of the Project 2
1.3 Applications 2
1.4 Problem definition 3
1.5 Organization of the Project 3

Chapter 2 Literature Survey 4

Chapter 3 Measuring Food Calories 9


3.1 Food Calorie measurement 9
3.2 Food Density 9
3.3 Image Processing 10
3.4 Pre-Processing 12
3.5 Segmentation 12
3.5.1 Image Filtering 12
3.5.2 Edge Detection 13
3.5.3 Threshold Technique 14
3.5.4 K-means Clustering 15
3.6 Feature extraction 16
3.6.1 HOG 17
3.7 SVM classification 19
3.7.1 Binary classification of linearly separable data 21
3.7.2 Non-linear SVM 22
3.8 Data pre-processing 23
3.8.1 Feature Categorization 23
3.8.2 Support vector 23
3.8.3 Scaling 23
3.8.4 RBF (Radial Basis Function) Kernel 24
3.8.5 Cross validation and grid search 24
3.8.6 Confusion Matrix 25
3.9 Using the thumb as a reference 26
3.9.1 Technique of Image Capturing 26
3.10 Calories Measurements and Estimation 27

v
Chapter 4 Experimental Results 28
4.1 Segmentation 28
4.2 Feature extraction 29
4.3 Support vector machine classification 29
4.4 Calorie measurement 30
Chapter 5 Conclusion 31
5.1 Conclusion 31
5.2 Future Scope 31

References 32

vi
List of Figures

Figure Figure Caption Page


No. No.

3.1 Block diagram of the overall system 9


3.2 Chromaticity diagram 11
3.3 Applying a mask to the image pixels 13

3.4 Representation of the clusters 15

3.5 Color clustering images 16


3.6 Sobel Mask 17
3.7 x- gradient, y- gradient, magnitude 18
3.8 Plotting of magnitude and direction values 18

3.9 Normalized histogram 19


3.10 SVM model for linearly separable data 21
3.11 Feature Space related to input space by a non-linear map 23
3.12 An over-fitting classifier and a better classifier 25
3.13 Captured food images with the correct position of the thumb 27

4.1 Original image (apple) 28


4.2 Segmented image (apple) 28
4.3 Original image (banana) 28
4.4 Segmented image (banana) 28
4.5 Original image (orange) 28
4.6 Segmented image (orange) 28
4.7 Histogram plot of apple 29
4.8 Histogram plot of banana 29
4.9 Histogram plot of orange 29
4.10 Feature vector of the images 29
4.11 Measured calories of the food items 30

vii
List Of Tables

Table Title Page


No. No.

3.1 Confusion matrix for a binary classifier 25


4.1 Confusion matrix 29

viii
List of Abbreviations

FRS Food Recognition System

Blob Binary Large Object

ROI Region of Interest

RBF Radial Basis Function

RGB Red, Green and Blue colour space

Lab Lightness and a ,b are color difference

HOG Histogram of Gradients

SVM Support Vector Machine

GUI Graphical User Interface

ix
Chapter 1
Introduction
1.1 Motivation
A system that can measure calories in every day meals can be very useful for people
across the globe who are concerned in watching their weight, eating more healthy, and
avoiding obesity. Obese people are more likely to have serious health conditions such
as hypertension, heart attack, high cholesterol, breast and colon cancer, and breathing
disorders. The main cause of obesity is the imbalance between the amount of food
intake and energy consumed by individuals . So, in order to lose weight in a healthy way,
as well as to maintain a healthy weight for normal people, daily food intake must be
measured. In most of obesity cases, it is not easy for the patients to measure or control
their daily intake due to the lack of nutrition education or self-control. Therefore, using
an assistive monitoring food system is very needed and effective for obesity elimination.

‘Measuring Calories using Food image system will assist dieticians or any individuals in
monitoring his/her daily food intake. This system uses image processing and
segmentation to identify food portions, measures the volume of each food portion and
calculates nutritional facts of each portion by calculating the mass of each portion from
its measured volume and matching it against existing nutritional fact tables. In most of
obesity cases, it is not easy for the patients to measure or control their daily intake due
to the lack of nutrition education or self
control. Therefore, using an assistive monitoring food system is very needed and
effective for obesity elimination. It is a more accurate measurement method for
estimating food portion volume, which also works for food portions with an irregular
shape. More importantly, the segmentation features are enriched by involving color as
well as shape, and size of the objects.

An important part of the application is the simple calibration method of using the thumb
of the individual inside of the food image, as a measurement pattern. The thumb in this
case allow the users to measure their food intake in any kind of environments like
home, restaurants or food courts. Thus, the primary purpose of the thumb is to
calculate the real size of the portions. Once the approximation of the real life size of
the portions is obtained, the calculations of the calories obtained from the image
processing procedure for variety of food items is finally performed.

1
1.2 Scope of the Project
A number of food intake measuring methods have been developed in the last few
years. However, most of these systems have drawbacks such as usage difficulties or
large calculation errors. Furthermore, many of these methods are for experimental
practices and not for real life usage. In this report, with the help of a software, the
system analyzes food images using image segmentation technique and uses a
database composed by a set of training and testing images in order to perform
recognition of the food present inside the image. Thus, this system uses image
processing and segmentation to identify food portions (i.e., isolating portions such as
fruits, vegetables and so on, from the overall food image), , and calculates calories of
each portion by calculating the mass of each portion from its measured volume and
then matching it against the existing nutritional fact tables. It is a measurement
method for estimating food portion volume, which also works for food portions with an
irregular shape. More importantly, the segmentation features are enriched by
involving texture as well as color, shape, and size of the objects. Color and texture are
the fundamental characters of natural images, and play an important role in visual
perception. Texture discriminates different patterns of images by extracting the
dependency of intensity between the pixels and their neighboring pixels, or by
obtaining the variance of intensity across pixels. Different features of color and texture
are combined together to measure food nutrition more accurately.

An important part of the system proposed in [2] is a simple calibration method which uses
the thumb of the individual inside of the food image, as a measurement pattern. The
thumb in this case will replace the calibration card (a card that is placed next to the food
when the image is captured, so that the dimensions of the food are known). In case of
misplacement or absence, the system will not work. The use of thumb will allow the
users to measure their food intake in any kind of environments like home, restaurants
or food courts. Thus, the primary purpose of the thumb is to calculate the real size of the
portions. The user of the system takes a picture of the food before and after eating to
compare the sizes of the portions before and after the food intake.

1.3 Applications
Food Recognition system (FRS) is an application which combines image analysis, where
the image is initially corrected and the noise present inside the picture is removed. The
study of a food image segmentation, classification, identification, and calorie
measurement system that used the shape and texture features with very limited

2
uses 150 images along with the size, shape and color features for each food item is
implemented using this system. A variety of food such as solid or liquid food and mixed
or non-mixed food can be used. Other existing work uses much fewer images (typically
hundreds) of mostly very specific food, and also do not consider the above condition
variations. For example, some systems have used the shape and texture features with
very limited images of food with not so accurate results. Included as part of our proposed
system, we have a practical approach for the measurement pattern, to introduce the
translation of image size to real life size which in this case is the thumb of the user to
perform the corresponding size translation.

1.4 Problem Definition


Obesity has become a widespread phenomenon all over the world. The obesity is
based on the body mass index (BMI) of an individual. A person is considered obese
when the BMI is higher than or equal to 30(kg/m2). In order to lose weight for obese
individuals in a healthy way, as well as to maintain the a healthy weight for normal
people the daily food intake must be measured, thus obesity treatment requires the
patient to record the amount of the daily food intake.

1.5 Organization of the project


The report presents the design, evaluation, and volume and calories estimation of a
food in an FRS-based image.
Chapter 2 - Related Work discusses and classifies some of the existing dietary
intake assessment methods.
Chapter 3 – System Components discusses the structure of the proposed system
and its main components.
Chapter 4 - System Workflow and Description specifies the design of the
proposed system from all perspectives.
Chapter 5 – Proposed Methodology discusses in details all the methods used in
the proposed system.
Chapter 6 - Evaluation and Performance Analysis presents the evaluation results
and analysis from the above chapter.
Chapter 7 - Conclusion and Future Work Summarises and concludes the thesis,
and what to expect from future work.

3
Chapter 2
Literature Survey
Twenty-Four-Hour Dietary Recall
It requires a dietician or even a trained interviewer to ask the respondent to remember
and record in detail all the food and drink he or she consumed during a period of time in
the recent past (typically the previous 24 hours [7]. The interview can occur either by
meeting with the patient or via phone; the interviewer should be familiar with nutritional
habits and cooking methods to complete and control the data collection format.
Moreover, the interview itself is restricted specifically to help the patient remember all
the needed information, which is not sufficient for overweight patients. Researchers
illustrate that the interviewer’s probing minimises the chance of underreporting or
forgetting by 25%. This means that self-monitoring and lack of communication with the
interviewer leads to negative results in this approach. Additionally, it is quite difficult for
a person to remember the contents and amount of one’s daily food intake, especially for
obese patients. In most cases, they cannot estimate the amount of their food intake, and
if the recall is unannounced, the diet is not changed. Thus, the main disadvantage of the
24-hour dietary recall is the delay and inaccuracy of reporting the eaten food due several
factors, such as age, gender, education, credibility and obesity. Moreover, this method
requires only short-term memory and an expert interviewer, which makes it an expensive
method.

Food Record Method


This method [3] is based on the processing of consumer food dairy lists created by an
expert nutritionist for a certain period of time. These lists contain the type and quantity
of food to reduce the error rate; mostly, these lists are sent to a group of selected
individuals. After a while, the nutritionist receives the completed dairy lists. The nutrition
specialist analyses, evaluates and compares the received data with typical data, so the
error rate is reduced. The main advantage of this method is that it does not rely on
memory like the previous method, as long as the data is recorded at the same time to
eat and the food intake weight is measured. However, one of the biggest disadvantages
of this method is that it does not measure the eating behaviour, which may significantly
affect obese patient’s techniques.

4
Calibration Card Technique
This type of technique [2] require the person to take a picture of the food before eating
it, so that the picture can be processed offline, either manually or automatically, to
measure the amount of calorie. It proposes a method that uses a calibration card as a
reference; this card should be placed next to the food when capturing the image, so that
the dimensions of the food are known. However, this card must always be present in the
photo when the user wants to use the system. The drawback is that the system will not
work without this card, which means that in the case of misplacement or absence of the
card, the system will not work.

Assistant-based Approaches
Nowadays, by applying technology to daily affairs, a mobile-based calorie measurement
is created [3]. With this method, people can use mobile devices as a user-interface and
send their data online to the specialist to calculate the amount of the food in the image.
Mobile applications provide a unique mechanism for gathering dietary information which
reduces the burden on record keepers. The captured image is send to the server for
manual analysis.
The nutrient information is extracted from the food using the USDA Food and Nutrient
Database for Dietary Studies (FNDDS) database. FNDDS is a database of nutrient
values contained in food eaten in the U.S. With this method, after taking an image from
the food, the image will be sent for particular processing to the server and every
calculation sent over the
server will be done manually. After that, analysis results are sent back to the user where
the user confirms and/or adjusts this information. A number of methods have been done
to classify/recognize food images. Parisa Pouladzadeh, Shervin Shirmohammadi and
Rana Almaghrabi proposed a ‘Food calorie and nutrition measurement system’ [1] that
can help patients and dieticians to measure and manage daily food intake. A system
which is built on food image processing and uses available calorie tables for comparison
with the performance results. Recently, there has been an increase in the usage of
personal mobile technology such as Smartphone or tablets, which users carry with them
practically all the time. With the help of a special calibration technique, this system uses
the built-in camera of such mobile devices and records a photo of the food before and
after eating it to measure the consumption of calorie and nutrient components. Accuracy
of this system is acceptable and it will greatly improve and facilitate current manual
calorie measurement techniques.

5
By analyzing the basic principle of Otsu method [16] and according to the distribution
characteristics of the target and background, an improved threshold image segmentation
wasdeveloped by Mengxing Huang and Wenjiao Yu . By narrowing the selection range
of threshold and searching the minimum variance ratio, the improved algorithm selects
the optimal threshold. This new improved algorithm [17] has advantages such as high
segmentation precision and fast computation speed.

Chen Junli and Jiao Licheng introduced the concept of SVM classification mechanism
[21]. The paper starts with an overview of structural risk minimization (SRM) principle,
and describes the mechanism of how to construct SVM. For a two-class pattern
recognition problem, detailed classification mechanism of SVM in three cases of
linearly separable,
linearly non-separable and nonlinear is given. By choosing an appropriate kernel
function, the SVM can map the low-dimensional input space into the high dimensional
feature space, and construct an optimal separating hyperplane with maximum margin
in the feature space.

‘An introduction to kernel-based learning algorithms’ was proposed by K.-R. Muller ,


S. Mika and G. Ratsch [25]. This paper provides an introduction to support vector
machines, kernel Fisher discriminant analysis, and kernel principal component
analysis, as examples for successful kernel-based learning methods. A short
background about kernel feature spaces and kernel based learning in supervised
and unsupervised scenarios including practical and algorithmic considerations is
proposed along with the usefulness of kernel algorithms by discussing applications
such as optical character recognition and DNA analysis.

Parisa Pouladzadeh proposed an ‘Intelligent SVM based food intake measurement


system’ [31], a semi-automated food intake measurement application, running on a
mobile device that could assist the patient to estimate his/her consumption calories.
In this paper, to improve the accuracy of the current state of the art technologies,
color k-mean clustering along with color mean shift and texture segmentation
schemes are employed to get more accurate results in segmentation phase.
Furthermore, the proposed system is built on food image processing techniques and
uses nutritional fact tables. The proposed algorithm extracts important features such
as shape, color, size and texture. Using various combinations of these features and
adopting computational intelligence techniques, such as support vector machine
6

support vector machine, as a classifier, accurate results are achieved which are
very close to the real calories of the food.

Computing RBF Kernel for SVM Classification Using Stochastic Logic [28] was
proposed by Yin Liu. The computation of RBF kernel is comprised of the squared
Euclidean distance and the exponential function. In this paper an efficient SVM
classifier with the approximate RBF kernel based on low-order polynomial
approximation is presented. Experimental results on two pedestrian classification
datasets show that the approximate RBF-kernel SVM achieved classification
performance comparable to the exact implementation, with significantly reduced
complexity in terms of both runtime and memory.

Shervin Shirmohammadil and Parisa Pouladzadeh implemented ‘FooDD: Food


Detection Dataset for Calorie Measurement Using Food Images’ [19] consisting of
3000 images that offer variety of food photos taken from different cameras with
different illuminations. Experimental results using color-texture segmentation, graph
cut segmentation on this database are carried out. The dataset comprises of 30
different categories of food and fruits. These food and fruit images are divided into
training and testing sets, where around 50% of the images from each group are used
to train the system and the remaining images serve as the testing set.

Image segmentation is one of important step in visual inspection of food product using
computer vision system. However, segmentation of food product image is not easily
performed if the image has low contrast with its background or the background in
acquired image is not homogeneous. ‘Automatic image segmentation using sobel
operator and k
means clustering’ [17] proposed by Azizi Abdullah explains k-means clustering
combined with Sobel operator for automatic food product image segmentation. Sobel
operator was used to determine region of interest (ROI) and k-means clustering was
then employed to separate object and background in ROI. The area outside ROI was
considered as background. The proposed method has been validated using 100
images of food product from ten different types. The validation results show that the
proposed segmentation method achieves good segmentation result.

Abdulsalam Yassine proposed ‘Food calorie measurement using deep learning


neural network which provides users/patients with convenient and intelligent
solutions that help
7

them measure their food intake and collect dietary information’. In this paper, an
assistive calorie measurement system runs on smartphones, which allow the user to
take a picture of the food and measure the amount of calorie intake automatically. In
order to identify the food accurately in the system, deep convolutional neural
networks is used to classify 10000 high-resolution food images for system training.
The results show that the accuracy with this method for food recognition of single
food portions is 99%.

Kernel methods give a systematic and principled approach to training learning


machines and the good generalization performance achieved can be readily justified
using statistical learning theory or Bayesian arguments. Description of how to use
kernel methods for classification, regression and novelty detection (abnormal
instances) was introduced by Campbell in ‘An Introduction to Kernel Methods’ [25]
and for each case the training can be reduced to optimization of cost function.
Algorithms for training these systems including model selection strategies and
techniques for handling unlabeled data is given in [23].This contrasts with neural
network approaches where the exist of false local minima in the error function can
complicate the learning process.

Thomas P. Weldon proposed ‘Removal of image segmentation boundary errors


using an N ary morphological operator’ [3]. In difficult image segmentation
problems, multidimensional feature vectors from filter banks provide effective
classification within homogeneous regions. However, such bandlimited feature
vectors often exhibit transitory errors at the boundaries between two regions. At
boundaries, the feature vector may make a transition through a region of feature
space that is incorrectly assigned to a third class. To remove such errors, an N-ary
morphological operator was proposed. The overall effect of the proposed operator
resembles an N-ary morphological erosion followed by an N-ary dilation.
8

Chapter 3
Measuring Food Calories
3.1 Food Calories Measurement

Fig. (3.1) Block Diagram of the overall system [1]

The overall design of the project is shown in Fig. (3.1). As the figure shows, at the early
stage, images are taken by the user with a mobile device followed by a preprocessing
step. Then, at the segmentation step, each image will be analyzed to extract various
segments of the food portion. Without having a good image segmentation mechanism,
it is impossible to process the image appropriately. Hence color and texture
segmentation tools are employed. We will show how these steps lead to an accurate
food separation scheme. For each detected food portion, a feature extraction process
has to be performed. In this step, various food features including size, shape, color
and texture will be extracted. The extracted features will be sent to the classification
step where, using the support vector machine (SVM) scheme, the food portion will be
identified. Finally, by estimating the area of the food portion and using some nutritional
tables, the calorie value of the food will be extracted. The thumb of the user and its
placement on the plate is a one-time calibration process for the thumb, which is used
as a size reference to measure the real-life size of food portions in the picture.

3.2 Food Density

The term of density, ρ, is described as the mass of any material per volume. Alternatively,

9
It is defined as the ratio of any food element’s component to the calorie. In the case of
foods, there are many different types of density depending on the relationship between
volume and mass. Those types are true density, solid density, subdivision density,
apparent density, and bulk density [2]. In particular, true density represents the density
of pure elements that result from the calculation of the food component densities with
preservation of mass and volume. Solid density represents the elements divided into
very small parts to make sure no pores appear. Subdivision density is known as the
density of material that has not been changed in it is internal construction and includes
the density of the internal pore without taking into account the external pore. To
calculate the density in apparent density, all internal and external pores must be
considered. Bulk density is defined as the total density of the material if packed or the
mass in the total volume occupied.

3.3 Image Processing

Image processing is a form of signal processing in which an image, picture or frame


from a video is processed to produce another image or a set of information, parameters
or specific data obtained from the characteristics of the initial image to be analyzed.
This pre-processing operation includes color space conversion, image cropping,
image padding, and so on. In our case, we used image processing to analyze the two-
dimensional signals inside the data of the image to define the contours of the food in
the image, perform a segmentation and a measurement of the objects to obtain an
approximation of the real-life size of the portions, and finally allow the nutritional facts
calculations with the information obtained from the image processing procedure [6].

Color Spaces

Inside of the digital images, we have picture elements or pixels, these pixels contain
finite values (three or four values) generally based on a mathematical abstraction
model. These mathematical models are used to define the internal structure of the
image, also called color spaces. Here, we have basic models such as RGB and RGBA.
The RGB color model is an additive color model in which red, green and blue light are
added together in various ways to reproduce a broad array of colors. The name of the
model comes from the initials of the three additive primary colors, red, green and blue.

10
The main purpose of the RGB color model is for the sensing, representation and
display of images in electronic systems, such as televisions and computers. The
RGB color model already has a solid theory behind it, based on human perception of
colors. RGB is a device dependent color model; different devices detect or reproduce
a given RGB value differently since the color elements and their response to the
individual R, G, and B levels contrast from maker to maker, or even in the same
device over time. Thus an RGB value does not define the same color across devices
without some kind of color management.

Fig (3.2) Chromaticity diagram

The Lab color space describes mathematically all perceivable colors in the three
dimensions L for lightness, a and b for the color opponents green–red and blue–yellow
[32]. One of the most important attributes of the Lab model is device independence.
This means that the colors are defined independent of their nature of creation or the
device they are displayed on. The space itself is a three-dimensional real number
space that contains an infinite number of possible representations of colors. The L*,
a*, and b* values are usually absolute, with a pre-defined range. The lightness, L*
represents the darkest black at L* = 0 and the brightest white at L* = 100. The color
channels a* and b*will represent true neutral gray values at a* = 0 and b* = 0.

11
Unlike the RGB and CMYK color models, Lab color is designed to approximate human
vision, it can be used to make accurate color balance corrections by modifying output
curves in the a and b components, or to adjust the lightness contrast using the L
component. The three coordinates of CIELAB represent the lightness of the color (L*
=0 yields black and L* = 100 indicates diffuse white; specular white may be higher), its
position between red/magenta and green (a* negative values indicate green while
positive values indicate magenta) and its position between yellow and blue (b*
negative values indicate blue and positive values indicate yellow).

3.4 Pre-Processing

In the beginning, a simple conversion must be performed on the image to change the
image size into a standard format for precise results for system segmentation. Thus,
the resolution of each image will be compared with standard resolution categories. We
have defined one resolution category as a standard, which are 970 × 720 pixels for
simplicity. Larger images will be reduced to this resolution before accomplishment of
any image-processing technique.

3.5 Segmentation

The segmentation phase starts immediately after analyzing the pre-processing step.
The goal of the segmentation step is to extract four features including: color, texture,
shape and size. These parts also include the calculation in pixels of the thumb and its
size in pixels by using a Gaussian edge detection filter. The extracted size will be used
in transforming the pixel size of food portions to actual, real-life size. In addition, the
color feature will be extracted by using the color histogram, while the size feature will
be extracted by including the pixels in the Region of Interest (ROI) for each food
portion. Moreover, this will give us the shape feature which will be used in our
calculating method.

3.5.1 Image Filtering

In general, filters accept an input, such as a noisy image, process it and then convert
it into an output, such as a de-noised image. In other words, a filter is a medium that
allows only certain components of the input to pass through. In image processing,
filters are used in several applications including edge detection, smoothing, and
others. In image segmentation,

12

filters are usually represented by small matrices or masks. The masking operation is
performed by continuously sliding the mask on the image, until the center of the mask
travels over all image pixels. At each mask location, image pixels are multiplied with
corresponding mask values, and the results of all multiplications are added to produce
the final result. The result is then assigned as a pixel value in a new, masked image.

Fig (3.3) Applying a mask to the image pixels (left: image pixels, right: mask)

For Figure (3.3), the masking operation works as follows. First, the center of the mask
is placed at the leftmost upper corner of the image – let the mask size be M1× M2,
where M1 is the mask height and M2is the mask width. If both the mask width and
height are odd, the mask center is at the array location ((M1 − 1) / 2, (M2− 1) / 2).

Different types of filters can be constructed using two-dimensional functions, such as


the Gaussian envelope function shown in formula (3.4).

2������{−��2+��2
√2����

��(��, ��) =1 2��


2} (3.4)

where ��2is the variance of the Gaussian function. The constant 1 √2����2is

usefor
normalization purposes.

3.5.2 Edge detection

Image edge detection is a process of locating the edge of an image which is important
in finding the approximate absolute gradient magnitude at each point I of an input
grayscale image. The problem of getting an appropriate absolute gradient magnitude
for edges lies in image processing and computer vision edge detection algorithms
13

the method used. The Sobel operator, sometimes called the Sobel–Feldman operator
or Sobel filter, is used in image processing and computer vision, particularly within
edge detection algorithms where it creates an image emphasizing edges. It computes
an approximation of the gradient of the image intensity function. The result of the
Sobel–Feldman operator is either the corresponding gradient vector or the norm of
this vector. The Sobel–Feldman operator is based on convolving the image with a
small, separable, and integer-valued filter in the horizontal and vertical directions and
is therefore relatively inexpensive in terms of computations.

The operator uses two 3×3 kernels which are convolved with the original image to
calculate approximations of the derivatives – one for horizontal changes, and one for
vertical. If A is defined as the source image, Gxand Gyare two images which at each
point contain the horizontal and vertical derivative approximations respectively, the
computations are as follows
0 −2 1 0 Gy = [ −1
−1 12100
Gx = [ ]∗A
0 −1 −2
1 0 −1 2 ] ∗ A and

where * here denotes the 2-dimensional signal processing convolution operation.


Since the Sobel kernels can be decomposed as the products of an averaging and a
differentiation kernel, they compute the gradient with smoothing. For example, Gxcan
be written as
1 0 −1 2 0 −2 1 2
][ 1
[ 1 0 −1
1 0 −1] (3.5)
]=[

The x-coordinate is defined here as increasing in the right direction, and the y-
coordinate is defined as increasing in the down direction. At each point in the
image, the resulting gradient approximations can be combined to give the gradient
magnitude and angle as explained further in 3.6.1

3.5.3 Threshold Techniques


Threshold techniques, which make decisions based on local pixel information, are
effective when the intensity levels of objects fall outside the range of levels in the
background. One of the threshold-based segmentation methods is Binary Large
Objects (Blob) which is used for thumb measurement.

14
3.5.4 K-means Clustering

The k-means algorithm iteratively computes the mean of a set of clusters, until it
converges to a stable set of cluster samples. In gray-scale images, areas are typically
modeled as uniform intensity areas. Segmentation algorithms employ some form of
Euclidean distance measure to determine pixel similarity either on a spatially local
basis or on a global color basis [20].

For color image processing, the clustering algorithms operate in complex


multidimensional spaces. Because of the added complexity of needing three variables
to represent color pixels, the issue of region segmentation in color images is not as
well defined as for gray-scale images. The K-means algorithm is used for clustering
data points or vectors into a number of clusters. In other words, it categorizes the
pixels into a number of clusters, where each cluster represents a specific texture. For
example, assuming a total of R vectors, ���� =1,2,…R for an image. The
representation of the clusters is shown in the figure (3.4)

Fig (3.4) Representation of the clusters

The goal of the K-means algorithm is to group or cluster the R vectors into K groups.
The algorithm of K-means is as follows:

1.Initialize K-cluster centroids (����) randomly.

A total of K vectors, ���� =1,2,3…,k are chosen randomly, ���� =������ ,L =1,2,…L
The vectors are called centroids. Each centroid is the typical vector of its own group.

15
2. Assign each sample to the nearest centroid. Each vector is assigned to one of the
K groups. A usually used distance measure is the Euclidean distance which is shown
in (3.6)

��2{����,����} = (����1 − ����1)2 + (����2 − ����2)2 +

⋯ + (������ − ������)2 (3.6)

3. Calculate centroids (means) of K-clusters.

4. If centroids are unchanged, done. Otherwise, go to step 2.

There are a lot of applications of the K-mean clustering, range from unsupervised
learning of neural network, Pattern recognitions, Classification analysis, Artificial
intelligent, image processing, machine vision, etc.

Figure (3.5) shows the result of the clustering scheme on a sample food image. As
the figure shows different colors are clustered appropriately.

(a) Original Image (b) K-means clustering


Fig (3.5) Color clustering images

3.6 Feature Extraction


An essential step in solving any object classification task is to represent the visual
information of the object. This is commonly known as feature extraction. Features
need to be robust to image perturbations, such as viewpoint and illumination
changes. Given the labeled pixels of an image after segmentation, we need to
extract visual characteristics from each region (food item) to help train the classifier
to identify each food item. Therefore, proper selection of features is the key to
correct classification.
16

Information to uniquely describe each food item yet not be domain-specific; they should
be easy to compute and relate well with the human visual system. Based on these
criteria, various types of features can be extracted for each segmented food region,
which are: color, size and shape. Color image quantization (clustering) is a process
that reduces the number of distinct colors used in an image, usually with the intention
that the new image should be as visually similar as possible to the original image or
the color feature we used edge detection and color k-mean clustering. For the size
and shape features we engaged the edge detection technique and counted the pixels
inside the ROI area of the image and used Hog (Histogram of Gradients).

3.6.1 HOG

A feature descriptor is a representation of an image or an image patch that simplifies


the image by extracting useful information and throwing away extraneous information
[13] [14].Typically, a feature descriptor converts an image of size width x height x 3
(channels) to a feature vector / 0 of length n. In the case of the HOG feature descriptor,
the input image is of size 16*16 and output image 1*10 with shape and color patches
each of 1*8 and 1*2.
To calculate a HOG descriptor, we need to first calculate the horizontal and vertical
gradients; after all, we want to calculate the histogram of gradients. This is easily
achieved by filtering the image with the following kernels.

Fig (3.6) Sobel mask

Next, we can find the magnitude and direction of gradient using the following

formula : �� = √����2 + ����2 (3.7)


17

The figure (3.7) below shows the gradients.

Fig (3.7) x-gradient, y- gradient, magnitude


At every pixel, the gradient has a magnitude and a direction. For color images, the
gradients of the three channels are evaluated (as shown in the Fig (3.7)). The
magnitude of gradient at a pixel is the maximum of the magnitude of gradients of the
three channels, and the angle is the angle corresponding to the maximum gradient.

Fig (3.8) Plotting of magnitude and direction values


18

The histogram contains 9 bins with angles from 0 to 360 degrees.

Fig (3.9) Normalized histogram

The histogram then undergoes normalization. For e.g. we have an RGB color vector
[128, 64, 32], the length of this vector is√1282 + 642 + 322 = 146.64. This is also

called the L2 norm of the vector. Dividing each element of this vector by 146.64 gives
us a normalized vector [0.87, 0.43, 0.22].Now the final histogram will give the color
and shape features.

3.7 SVM Classification


Once the food items are segmented and their features are extracted, the next step is
to identify the food items using statistical pattern recognition techniques [22]. The
recognition process often consists of two steps. In the training phase, a model is
learned using training data. The model is tested using unseen data to assess the
model’s accuracy in the testing phase. Through training, the classifier learns how to
map the features into various categories or labels. However, the training is not perfect
and the classifier will make mistakes in actual operation by assigning the wrong label
to an observed feature vector. Training the classifier has two goals. One goal is to
define how it will assign labels to observed feature vectors and the other is to estimate
its error performance or its classification accuracy. Support vector machines are a set
of manageable learning methods used for classification and regression [22]. They
belong to a family of global linear classifiers. In other words, the support vector
machine is a classification and regression device that uses machine learning theory to
maximize predictive accuracy to automatically fit data into the best category. Support
vector machines can be defined as systems which use the hypothesis space of linear
functions in a high dimensional feature space are given only by their attributes.

19

One against one approach

One against one approach performs pair-wise comparisons between all n classes.
Thus, all possible two class classifiers are evaluated from the training set of n classes,
each classifier being trained on only two of the n classes. Applying each classifier to
the test data vectors give one vote to the winning class. The data is assigned the label
of the class with most votes. The feature vectors of each food item, extracted during
the segmentation phase, will be used as the training vectors of SVM.

In the classification phase, the features of each image are feed into a look up table and
its most probable food type will be generated as output of this process. After training
phase the classifier will be as simple as a look up table, which receives the features
and gives the food type. Please note that the training phase has a significant role in
categorizing the foods, and its accuracy is related to the number of features and
training data. The classifier is enriched by using wide threshold range for each feature.
We select a set of images first as a training set and a second set of images. It’s as a
testing set, which is used to validate the reliability of the model. In the first level, every
image is segmented and portions are identified. Classification with the SVM provides
the system with the type of food.

One against the rest approach

This method is also called winner-take-all classification. Suppose the dataset is to be


classified into M classes [22]. Therefore, M binary SVM classifiers may be created
where each classifier is trained to distinguish one class from the remaining M-1
classes. For example, class one binary classifier is designed to discriminate between
class one data vectors and the data vectors of the remaining classes. Other SVM
classifiers are constructed in the same manner. During the testing or application
phase, data vectors are classified by finding margin from the linear separating
hyperplane. The final output is the class that corresponds to the SVM with the largest
margin. This multiclass method has an advantage in the sense that the number of
binary classifiers to construct equals the number of classes. However, there are some
drawbacks. First, during the training phase, the memory requirement is very high and
amounts to at the square of the total number of training samples. This may cause
problems for large training data sets and may lead to computer memory problems.
20

3.7.1 Binary classification of linearly separable data

The main aim of binary SVM is to classify the given training samples into two classes
by constructing a hyper plane that separates the patterns [23]. There are infinite hyper
planes possible between the patterns. The optimal hyper plane should be such that
the distance from the closest examples (the margin) to the hyper plane is maximized
and examples belonging to a same class should be on same side of the hyper plane.
A linear separable data set can be represented by two classes as shown in Fig. (3.11).
The three parallel lines form the normal plane. Consider training data of form
{����,����} where x represents the attribute set and y the class labels than
����ϵ{-1,+1}and i=1…N. Therefore, the hyper plane can be described as
��. �� + �� = 0 where �� is normal to the hyper plane and ��
||��||is the perpendicular distance

from the hyper plane to the origin. In training phase, estimation of parameter w and b
from training data must meet the following conditions:

Fig (3.10) SVM model for linearly separable data [2]

These are obtained by moving parallel planes away from the hyper plane until it
touches the closest samples on either side of the hyper plane. The samples that lie
closest to the
separating hyper plane are called support vectors and they lie on the planes
described by Eq. (3.9) and (3.10)
The planes are equidistant from the hyper plane which implies d1=d2 and this
distance between the planes is known as the margin of the classifier. This margin is
21

maximized so that the orientation of the hyper plane is as far as possible from the
support vectors. Structural risk minimization (SRM) plays an important role in ensuring
that the margin is maximized to prevent worst case generalization error [2]. SRM
provides an upper bound to the generalization error of the classifier R, with number of
training samples N, training error Re and its model complexity is known as its capacity
h. With probability of (1- η), the generalization error of the classifier can be worst at
given in Eq. (3.11) where φ is an increasing function of capacity h.

As the capacity increases generalization error bound will increase according to the
SRM principle. Thus to minimize the error, the model should have large margin as
capacity (h) is inversely proportional to the margin. To maximize the margin, it is
required to minimize ||w|| which is equivalent to minimizing the function given by Eq.
(3.12)
The optimization task subject to set of inequality constraints is required to minimize the
parameters. Lagrange multipliers are used to solve the optimization problem and the
objective function is rewritten as Eq. (3.13).

Linear SVM methodology is not applicable for many real time datasets that have

non-linear boundaries. Kernel trick is used to transform such data from its original

co-ordinate system into a new space ∅(x) with dimension d where linear decision

boundary can be used to separate the instances into the transformed space H, as

shown in Fig. (3.12). We apply SVM to linear separable data by computing matrix from
dot product of input variables ����and ����. The kernel functions are used to

map data to higher dimensions. This involves calculation of inner products of two

vectors which of the form ∅(x). ∅(y).This trick is useful for many classification

problems with nonlinear data as we need to know only inner product of the inputs

in the feature space without need to calculate ∅. The mapping function∅ is not

known prior, and if the number of training vectors ∅(����) is very large than
computation of dot product becomes difficult. Also the kernel function used for
nonlinear SVM should satisfy Mercer theorem [22]. This theorem states that every
semi positive definite and symmetric

22

function can be a kernel function K (����,����.) provided there exist a mapping


φ for the pair of input vectors to be expressed in form of dot product into the
transformed space [24].

(3.11) Feature Space related to input space by a non-linear map ∅

There are number of kernels that can be used in Support vector machines models.
These include linear, polynomial, radial basis function (RBF) and sigmoid. As the data
is previously unknown it is difficult to make a proper choice out of the above mentioned
kernels. Usually, during model building process each of the kernels are applied on the
data and the kernel that gives best performance is chosen.

3.8 Data Pre-processing

3.8.1 Feature Categorization


In SVM, all data are represented as a vector of real numbers. So for each feature we
have to convert their value to numeric data. One way is to show them using a
combination of 0, 1 numbers. For example, a three-category attribute such as red,
green, blue can be represented as (0,0,1), (0,1,0), and (1,0,0).

3.8.2 Support vectors


Support vectors are the data points that lie closest to the decision surface (or
hyperplane). They are the data points most difficult to classify. They have direct
bearing on the optimum location of the decision surface.

3.8.3 Scaling
The important fact that can be reached by scaling is avoiding difficulties in numerical

23

calculation. Because kernel values usually depend on the central products of feature
vectors, it is better to use scaling in the range of [-1; +1] or [0; 1]. Please note that we
have to use the same method to scale both training and testing data.

3.8.4 RBF (Radial Basis Function) Kernel


The RBF kernel is a reasonable first choice. This kernel maps the samples into a higher
dimensional space, nonlinearly. So unlike the linear kernel, it can handle a case when
the relation between class labels and attributes is nonlinear. The second reason is the
number of hyper parameters which increase the complexity of model selection. The
polynomial kernel has more hyper parameters than the RBF kernel. Finally, the RBF
kernel has fewer numerical difficulties. There are some situations where the RBF
kernel is not suitable. For example, when the number of features is very large, one
may just use the linear kernel.

3.8.5 Cross-validation and Grid-search


There are two parameters for an RBF kernel: C. The goal of this step is to find the best
value for C, so that the classifier can accurately predict unknown data (i.e. testing data).
A common strategy in this classifier is to separate the dataset into two parts of which
one is considered unknown. The prediction accuracy obtained from the unknown set
more precisely reflects the performance on classifying an independent dataset. An
improved version of this procedure is known as cross-validation. The advantage of
using cross-validation is in preventing an over-fitting problem. Figure (3.13) represents
a binary classification problem to illustrate this issue. Filled circles and triangles are
the training data while hollow circles and triangles are the testing data.
(a) Training data and an over-fitting classifier (b) Applying an over-fitting classifier on testing data

24

(c) Training data and a better classifier (d) Applying a better classifier on testing da ta Fig (3.12) An
over-fitting classifier and a better classifier (● and ▲: training data)

The testing accuracy of the classifier in Figure (a) and (b) is not good since it over-fits
the training data. If we think of the training and testing data in Figure (3.14), (a) and
(b) as the training and validation sets in cross-validation, the accuracy is not good. On
the other hand, the classifier in (c) and (d) does not over-fit the training data and gives
better cross-validation as well as testing accuracy. A good way to find is using “grid-
search".

3.8.6 Confusion matrix

A confusion matrix is a table that is often used to describe the performance of a


classification model(or "classifier") on a set of test data for which the true values are
known. The confusion matrix itself is relatively simple to understand.

An example of confusion matrix for a binary classifier is given (though it can easily be
extended to the case of more than two classes):
Table [3.1]: confusion matrix for a binary classifier
N=165 Predicted : NO Predicted : YES

Actual : NO 50 10

Actual : YES 5 100

There are two possible predicted classes: "yes" and "no". If we were predicting the
food items apple and orange, "yes" would mean for example the food item is apple,
and "no" would

25

mean the food item is orange. The classifier is made of total 165 predictions. Out of
those 165 samples, the classifier predicted "yes" 110 times, and "no" 55 times. In
reality, 105 food samples are apple, and 60 samples are orange.

The most basic terms in the confusion matrix are:

∙ True positives (TP): These are cases in which we predicted yes (apple), and the
food samples are apple.
∙ True negatives (TN): We predicted no, the food samples are orange. ∙ False
positives (FP): We predicted apple, but the food samples actually are orange
(Also known as a "Type I error.")
∙ False negatives (FN): We predicted no (orange), but the food samples are
actually apple. (Also known as a "Type II error.")

3.9 Using the Thumb as a Reference

The FRS is based on a new measuring technique, which involves the user’s thumb in
the captured photo. This technique has an important contribution in our system.
Besides the ease of use and availability everywhere, the thumb is considered a typical
standard to analyze the dimensions of the selected food item in our system. The user
will identify the thumb from the first-time usage (one time calibration), and the size of
thumb will be a standard measurement that will be compared to all the extracted food
sizes entering the system. In details, the extracted food area will be compared to the
thumb including all features, such as color and size.
3.9.1 Technique of Image Capturing

The calculation will start by finding the binary large object corresponding to the thumb
blob, and consequently, the number of pixels can be extracted, noting that, with each
image, we have defined the region of interest (ROI) to get more accurate calculation
results of the thumb inside the image [10]. A person’s thumb can be used to calibrate
the image and analyse the dimensions of the selected food item. First, the user will
capture two photos of the selected food, one from the top and the other from one side
of the dish, with his or her thumb placed in the photo. Figure (3.13) shows a captured
food image with the position of the thumb.

26

Fig (3.13) Captured food images with the correct position of the thumb

3.10 Calories Measurements and Estimation

The main objective of the FRS is to estimate the amount of calories for any food type
from an image. Thus, calorie estimation is the main, final stage for our system. We are
defining the classes for the respective food item. Depending on the SVMs predicted
result the food items are already been classified. From here we get the three classes
and since we are using the dataset for three food items, the fixed calories are defined
for their respective classes. We measure the respective calories with the help of the
predefined classes. Thus the classified food items along with its calories are displayed.
27

Chapter 4
Result and analysis
28

4.2 Feature extraction

4.3 Support vector machine Classification


Table [4.1]: confusion matrix

N=90 Predicted: Predicted: Predicted:


Apple Banana Orange
Actual: Apple 30 0 0

Actual: Banana 0 29 1

Actual: Orange 0 0 30

The confusion matrix gives us the information about which food item is classified as
the right food item. From table [4.1] we can see that out of 30 apple’s test images all
the 30 are recognized as the correct food item i.e. apple. For banana out of 30 test
images only 29 are classified as banana and one is classified as orange. For the
third food item which is orange all the 30 test images are classified as orange.

29

4.4 Calorie measurement

Fig (4.11): Measured calories of the food item


30

Chapter 5
Conclusion and Future Scope

5.1 Conclusion
In this project, we have proposed a measurement method that estimates the amount
of calories from a food’s image and detects the type of food item. The system is
designed to help dieticians for the treatment of obese or overweight people, although
normal people can also benefit from the system by controlling more closely their daily
food intake without worrying about overeating and weight gain. We focused on
identifying food items in an image by using image processing and segmentation with
the help of k-means clustering.
Feature extraction we used histogram of oriented gradients. Support vector machine
is used to classify the food items by training and testing the food samples. Once the
food item is classified, calories for that respective food sample is measured. The
results indicated 94.56% accuracy for classification of food items and calorie
measurement.

5.2 Future Scope


Potential extension of current work is enabling the system to detect food portions within
some mixed food. Such extensions need more complicated methods in all steps to
increase the accuracy and reliability of the system. Moreover, we can cover more food
types from a variety of cuisines around the world by storing more types of food and data
from restaurants that provide the amount of calories and the nutrition facts for their
menus. For segmentation part, some novel methods including Salient Region Detection,
Speeded-Up Robust Features (SURF) and also Fast Rejection, can be engaged in our
future food recognition system. Similarly, for classifying phase, the RBF kernel function
of SVM, can be improved by using a more accurate but more complex polynomial kernel
function. For patients who suffer from chronic diseases such as diabetes or high blood
pressure, the system will have the ability to give a recommendation of how much glucose
or sodium chloride they can consume per day. The user can add these features to the
processing step, in order to have a more accurate recognition system
31

References
[1] ParisaPouladzadeh, ShervinShirmohammadi, and Rana Al-Maghrabi, “Measuring
calories using food image,” IEEE Transactions on Instrumentation and Measurement (
Volume: 63, Issue: 8, Aug. 2014 ) University of Ottawa, Canada, 2013

[2] P. Pouladzadeh, G. Villalobos, R. Almaghrabi, and S. Shirmohammadi, "A Novel SVM Based
Food Recognition Method for Calorie Measurement Applications," IEEE International
Conference, Melbourne, Australia, 2012, pp. 495–498.

[3] Pouladzadeh, Parisa, "An Image Processing and Pattern Analysis Approach for
Food Recognition”, University of Ottawa, Ottawa, thesis 2012.

[4] Bray ,George A.,&Bouchard, Claude, Handbook of Obesity,2nd ed.,New York,USA :Marcel
Dekker,2004.

[5] J. Canny, "A Computational Approach to Edge Detection," IEEE Transactions on Pattern
Analysis and Machine Intelligence, vol. PAMI-8, no. 6, 1986.

[6] . F. Chan and L. A. Vese, "Active Contours Without Edges," IEEE Transactions on
Image Processing, vol. 10, no. 2, February 2001.

[7] Beasley, J., "The pros and cons of using pdas for dietary self-monitoring," Journal
of the American Dietetic Association, vol. 107, no. 5, May 2007

[8] 25. Hargrove JL: History of the calorie in nutrition. The Journal of nutrition 2006,
136(12):2957- 2961.

[9] M. Kass, A. Witkin, and D. Terzopoulos, "Snakes: Active Contour Models,"


International Journal of Computer Vision, vol. 1, no. 4, pp. 321–331, 1988.

[10] G. Villalobos, R. Almaghrabi, B. Hariri, and S. Shirmohammadi, "A Personal Assistive


System for Nutrient Intake Monitoring," in International ACM Workshop On Ubiquitous
Meta User Interfaces, 2011, pp. 17–22.
34

[11] R. C. Gonzalez and R. E. Woods, Digital Image Processing, 3rd ed.: Pearson Prentice Hall, 2008.

[12] Haoyu Ren, Ze-Nian Li, Object detection using edge histogram of oriented gradient,
Image Processing (ICIP), 2014 IEEE International Conference on Paris, France,30th Oct.

[13] Histogram Of Oriented Gradients Grace Tausig. Electrical Engineering, Systems.


University of Michigan.September 28,2010.

[14] https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients

[15] https://en.wikipedia.org/wiki/Radial_basis_function_kernel

[16] NesrineBdioui, Mourad Moussa and Ali Douik, “ Entropy based thresholding for
color image segmentation”, IEEE Conference, 5-7 Nov. 2014

[17] K Muthukannan, M Merlin Moses, “Color image segmentation using k-means


clustering”, IEEECommunication and Computational Intelligence
(INCOCCI), 2010 International Conference on27-29Dec. 2010

[18] Yong Zhao, Yongjun Zhang, An Enhanced Histogram of Oriented Gradients for Pedestrian
Detection, IEEE Intelligent Transportation Systems Magazine ( Volume: 7, Issue: 3, Fall
2015 ),pp 29 – 38 ,24 July 2015

[19] P. Pouladzadeh, A. Yassine, and S. Shirmohammadi, “FooDD: Food Detection Dataset for
Calorie Measurement Using Food Images”, in New Trends in Image Analysis and
Processing - ICIAP 2015 Workshops, V. Murino, E. Puppo, D. Sona, M. Cristani, and C.
Sansone, Lecture Notes in Computer Science, Springer, Volume 9281, 2015, , pp 441-
448.

[20] https://en.wikipedia.org/wiki/K-means_clustering

[21] C. J. C. Burges, “A tutorial on support vector machines for pattern recognition,” Data
Mining Knowl., vol. 2, no. 2, pp. 121–167, 1998.

35

[23] T. Mitchell, "Machine Learning," McGraw-Hill Computer Science Series, 1997

[24] Vapnik and C. Cortes, "Support-vector network," Machine Learning, vol. 20, pp.
273–297, 1995.

[25] K. Muller, S. Mika, G. Ratsch, K. Tsuda, and B. Scholkopf, "An introduction to kernel-
based learning," IEEE Transactions on Neural Networks, vol. 12, no. 2, pp. 181–
201, March 2001.

[26] ] S. Keerthi and C. J. Lin, "Asymptotic behaviors of support vector machines with
Gaussian kernel," Neural Computation, vol. 15, pp. 1667–1689, 2003.

[27] https://en.wikipedia.org/wiki/Radial_basis_function_kernel

[28] V. Vapnik, S. Golowich, and A. Smola, "Support vector method for function
approximation, regression estimation, and signal processing," in Advances in
Neural Information Processing Systems, Cambridge, MA, 1997, pp. 281–287.

[29] Allwein,E.L.Schapire,R.E.andSinger.Y,Reducing multiclass to binary: a unifying


approach for margin classifiers. Journal of Machine Learning Research ,1:113-114.Y.2001.

[30] S. Arivazhagan, R. N. Shebiah, S. S. Nidhyanandhan, and L. Ganesan, "Fruit


Recognition using Color and Texture Features," Journal of Emerging Trends in
Computing and Information Sciences, vol. 1, p. 90—94, October 2010.

[31] ParisaPouladzadeh, ShervinShirmohammadi, “Intelligent SVM based food intake


measurement system, 2013 IEEE International Conference on Computational Intelligence
and Virtual Environments for Measurement Systems and Applications (CIVEMSA), 15-17
July 2013.

[32] https://en.wikipedia.org/wiki/Lab_color_space
36

You might also like