Documente Academic
Documente Profesional
Documente Cultură
Ourdietaryhabitsaffectourhealthinmanyways.Researchhasconfirmedthatdietary
habitsareimportantfactorsforhealthylivingandhaveprofoundimpactsonmanychronic
illnesses.Thevastmajorityofthepopulationhaschronicillnessessuchasheartdisease,
diabetes,hypertension,dyslipidemia,andobesity.ArecentSurgeonGeneralReport
indicatedthatapproximately300,000U.S.deathsareassociatedwithobesityand
overweighteachyear.Thetotalcostattributedtooverweightandobesityamountsto117
billionin2000.Properdietaryintakeandrelatedinterventionsareeffectiveinameliorating
symptomsandimprovinghealth.
Nutritiousdietaryisoneofthemostaccessiblemeansforpeopletopreventillnessandto
promotewellbeing].Unliketraditionalhealthcareinwhichprofessionalsassessandweigh
onesdietaryintakeandthendevelopaplanforbehavioralchanges,ubiquitoushealthcare
technologiesprovideanopportunityforindividualseffortlesslytoquantifyand
acknowledgetheirdietaryintake.Forexample,athomepatientsfacethebersomeneedto
recordeverythingtheyeat,ataskwhichcantakeaminimumof1520minutesperday.
Ubiquitouscomputingtechnologiesprovideameansforindividualstoproactivelymonitor
theirintakeandactuponit,leadingtobetterfoodselectionandmoresensibleeating.
ProblemandSolution
ThisthesisproposesadietawareSmartAirtificialIntelligentPlatformforFinding
AdaptiveDietChatforDifferentindividualthatautomaticallyUpdatewhatandhowmuch
eachindividualneedtoeatoverthecourseofameal.
ConsideringtheRealTimeFact,Poor nutrition can impair our daily health and
wellbeing and reduce our ability to lead an enjoyable and active life.
In the short term, poor nutrition can contribute to stress, tiredness and our
capacity to work, and over time, it can contribute to the risk of developing
some illnesses and other health problems such as:
The user will Update and Maintain Personal profile , give it as an input to the Diet360
engine which will pre- process the User Input according to the requirements
The System involves a number of demanding Evaluation Process steps and other
complicated algorithms which has to be implemented on Diet 360 Services for
considering its limitations and Personalized User
1.1
Chapter 1: This chapter gives a brief overview of the entire project and its scope.
Chapter 2: This Chapter describes the review of literature done for the entire project and
the comparison of the proposed system with respect to existing system.
Chapter 3: This Chapter gives the different requirements and analyses them.
Chapter 4: This Chapter describes the different processes used in the system and the
implementation diagrams.
Chapter 5: This Chapter describes the different algorithms used in the image and the
snapshots of the current system.
Chapter 6: This Chapter gives the different test cases regarding the project and their
analysis.
Chapter 7: This Chapter contains the Timeline chart and Gnatt chart.
Chapter 8: This Chapter concludes the topic and gives the future scope.
REQUIREMENT ANALYSIS
3.1
FEASIBILITY ANALYSIS
Feasibility study is an evaluation and analysis of the potential of the proposed project.
The different strengths and weaknesses regarding the system are discussed and the
various factors such as cost and performance are considered. The trade-off required to
perform well and at the same time not to exploit the resources is also being described in
detail in the following sections.
The document provide the feasibility of the project that is being designed and lists
various areas that were considered very carefully during the feasibility study of this
project such as Technical, Economic and Operational feasibilities. The following are its
features:
3.1.1
Technical Feasibility
The system must be evaluated from the technical point of view first. The assessment of
this feasibility is based on an outline design of the system requirement in the terms of
input, output, programs and procedures.
In order to make the system feasible, the different algorithms used in the project are
based on a consideration of the platform being used. The system is built for recognizing
the characters from the images captured from an Android based camera phone. As a
result the various factors considered are the limited memory that is available on a mobile
phone, the amount of resolution available for a android based phone, no floating point of
the phone, etc.
In order to have minimal processing done, the pre-processing operation is done based by
converting the color image to grayscale and then further to binary. The color to grayscale
conversion is done using a simple formula. Similarly the grayscale to binary conversion
is done by calculating an adaptive threshold and then comparing the pixel values of the
image. In case we use the global thresholding method the processing required would be
minimal but the performance degrades. Thus, in order to keep a trade-off between
performance and processing required to meet the limited resource utilization necessity we
use adaptive thresholding technique.
The next operation performed is Edge detection in order to detect the edges and remove
noise if present in the image. This is done using the Sobel edge detection filter, since it
computes the edges based on a 3 x 3 mask. Also using Sobel filter the noise removal is
done so that in the later stage the characters are recognized properly.
Image segmentation is performed followed by edge detection wherein we use horizontal
and vertical projections of the image and calculate their histograms so as to detect the
individual lines and words present in each line. In order to keep processing minimal we
have sacrificed on skew correcting the image. Thus, image with the characters having
different skew angles are not digitized correctly.
Lastly in the character recognition phase, we havent stored the feature vectors of the
characters in the database instead we have stored all the pixel values in an array because
when we perform the dissimilarity measure based on the feature vector the processing
time required was increased. The dissimilarity based on the pixel values is computed by
simply subtracting the pixel values of the cropped character from the character stored in
the database. If the difference calculated is more than the threshold, then the characters
are not similar, otherwise they are.
So there are minimal constraints involved with this project.
3.1.2
Resources Feasibility
The system is built for an android based mobile phone. In the android phones, the
applications stored, uses the phone memory instead of the memory card. As a result of
which the application built should be such that it uses minimal resources of the system.
Also mobile phones have minimal memory available and no floating point unit.
Considering all these factors the system is built. Also the built system does need any
dedicated hardware or does not depend on the network.
3.2
REQUIREMENT ANALYSIS
Requirement analysis encompasses the task that go into determining the different
requirements of different stakeholders. The users of the system are common people and
the only requirement the users demand from the system is that the application should
occupy minimal space in the phone and run independent of the other applications. The
performance offered by the application should also be acceptable for the user. The
application need not require any additional hardware or software requirement and must
be feasible on all the phones with the same platform. Also the application must be userfriendly for the user and the user need not require somebodys help in learning the
system. The user need not know the internal operation of the system. Also the user need
not worry about the resource allocation and stuff.
Considering the requirements of the user, the application is built. The user-interface is
easy to understand and also since the user is not able to see any operation that is being
done at the back end the user is not worried about anything. The application works in
isolation and thus does not interrupt in the working of the other applications.
3.3
SYSTEM ANALYSIS
System analysis is the study of sets of interacting entities. The entire system is based on
different sub modules. These different sub modules work independently and do not
interrupt the working of other. The first sub module includes the activity of capturing
image. The next module being the pre-processing module, this module takes in the input
from the previous module and processes it. It returns a preprocessed image which it
would now be suitable to process further. Then the next module that is edge detection
module detects the edges present in the image and removes the noise from the already
pre-processed image. After edge detection, comes the image segmentation module which
segments the image to detect the individual lines, words of each line and then crops the
characters present in each word. The character recognition module follows the image
segmentation module where the actual characters are recognized by it comparing the
individual cropped character images with the ones present in the database. Thus, none of
the modules work independently without affecting the operation of the other modules.
3.4
CHAPTER 2
REVIEW OF LITERATURE
The different papers we referred in context with the project are given below s follows:
A Theory Based on Conversion of RGB image to Gray image, Tarun kumar, Arun
Verma [6]
In RGB color model, each color appears in its primary spectral components of red, green,
and blue. The color of a pixel is made up of three components; red, green, and blue
(RGB), described by three corresponding intensities. This color image is converted to
grayscale image with 256 levels of brightness using the conversion formula. This is done
by forming a weighted sum of R, G, and B components.
equivalence is found, the data structure used to support the merging being a simple 1D
array. This approach allows the check for a conflict to be carried out on
class identifiers
rather than on labels, as instead it is mandatory with the classical algorithm. It has been
show that this significantly improves the efficiency of the labelling process.
Image segmentation for Text Extraction, Neha Gupta, V.K. Banga [8]
In this paper, image segmentation is performed by calculating horizontal and vertical
projections of the image. The projection profile is used to separate text blocks into single
line text. There are two types of projection profile. One is horizontal profile and another
one is vertical profile. A horizontal profile is defined as vector of the sum of the pixel
intensities over each column and a vertical profile is defined as vector of the sum of the
pixel intensities over each row. The horizontal and vertical projections of the binary edge
map are found. The average value of maximum and minimum of the vertical projection is
taken as threshold and in the same way, maximum and the minimum value of horizontal
projection is taken as threshold. In case of vertical projection, the rows whose sum of
pixel intensities above the threshold are taken and in case of horizontal projection only
the columns whose sum of pixel intensities above the threshold is taken.
1. Language Emulator
In this system a photo taken from the mobile phone needs to be sent to the server, and
server does the character recognition, language translation and sends the customer the
translated text via SMS.
The system is divided into four modules:
Request Acceptance
Character Recognition
Language Translation
Response Delivery
In Request Acceptance module the request from the customer is acknowledged i.e. the
image is received from the clients mobile phone. In Character Recognition module the
characters are extracted from the given image. In Language Translation the extracted
string which is in a different language is converted into English language. In Response
Delivery the text is sent back to the clients mobile via SMS.
This system lets select a text region on the desktop screen, performs the character
recognition and returns me the characters. It is useful in situations where the text can only
be viewed (not copied or printed). The available selection modes include whole window
selection, scrolling capture, simple cursor capture, and rectangular selection.
The Existing System needs specialized hardware or depends on the network for optical
character recognition but the current system is capable of performing the required task
without these requirements. Also, the limitation of the mobile phones is also considered
and processing done is not too exhaustive since mobile phones do not have a floating
point unit and have very limited memory.
CHAPTER 3
REQUIREMENT ANALYSIS
3.5
FEASIBILITY ANALYSIS
Feasibility study is an evaluation and analysis of the potential of the proposed project.
The different strengths and weaknesses regarding the system are discussed and the
various factors such as cost and performance are considered. The trade-off required to
perform well and at the same time not to exploit the resources is also being described in
detail in the following sections.
The document provide the feasibility of the project that is being designed and lists
various areas that were considered very carefully during the feasibility study of this
project such as Technical, Economic and Operational feasibilities. The following are its
features:
3.5.1
Technical Feasibility
The system must be evaluated from the technical point of view first. The assessment of
this feasibility is based on an outline design of the system requirement in the terms of
input, output, programs and procedures.
In order to make the system feasible, the different algorithms used in the project are
based on a consideration of the platform being used. The system is built for recognizing
the characters from the images captured from an Android based camera phone. As a
result the various factors considered are the limited memory that is available on a mobile
phone, the amount of resolution available for a android based phone, no floating point of
the phone, etc.
In order to have minimal processing done, the pre-processing operation is done based by
converting the color image to grayscale and then further to binary. The color to grayscale
conversion is done using a simple formula. Similarly the grayscale to binary conversion
is done by calculating an adaptive threshold and then comparing the pixel values of the
image. In case we use the global thresholding method the processing required would be
minimal but the performance degrades. Thus, in order to keep a trade-off between
performance and processing required to meet the limited resource utilization necessity we
use adaptive thresholding technique.
The next operation performed is Edge detection in order to detect the edges and remove
noise if present in the image. This is done using the Sobel edge detection filter, since it
computes the edges based on a 3 x 3 mask. Also using Sobel filter the noise removal is
done so that in the later stage the characters are recognized properly.
Image segmentation is performed followed by edge detection wherein we use horizontal
and vertical projections of the image and calculate their histograms so as to detect the
individual lines and words present in each line. In order to keep processing minimal we
have sacrificed on skew correcting the image. Thus, image with the characters having
different skew angles are not digitized correctly.
Lastly in the character recognition phase, we havent stored the feature vectors of the
characters in the database instead we have stored all the pixel values in an array because
when we perform the dissimilarity measure based on the feature vector the processing
time required was increased. The dissimilarity based on the pixel values is computed by
simply subtracting the pixel values of the cropped character from the character stored in
the database. If the difference calculated is more than the threshold, then the characters
are not similar, otherwise they are.
So there are minimal constraints involved with this project.
3.5.2
Resources Feasibility
The system is built for an android based mobile phone. In the android phones, the
applications stored, uses the phone memory instead of the memory card. As a result of
which the application built should be such that it uses minimal resources of the system.
Also mobile phones have minimal memory available and no floating point unit.
Considering all these factors the system is built. Also the built system does need any
dedicated hardware or does not depend on the network.
3.6
REQUIREMENT ANALYSIS
Requirement analysis encompasses the task that go into determining the different
requirements of different stakeholders. The users of the system are common people and
the only requirement the users demand from the system is that the application should
occupy minimal space in the phone and run independent of the other applications. The
performance offered by the application should also be acceptable for the user. The
application need not require any additional hardware or software requirement and must
be feasible on all the phones with the same platform. Also the application must be userfriendly for the user and the user need not require somebodys help in learning the
system. The user need not know the internal operation of the system. Also the user need
not worry about the resource allocation and stuff.
Considering the requirements of the user, the application is built. The user-interface is
easy to understand and also since the user is not able to see any operation that is being
done at the back end the user is not worried about anything. The application works in
isolation and thus does not interrupt in the working of the other applications.
3.7
SYSTEM ANALYSIS
System analysis is the study of sets of interacting entities. The entire system is based on
different sub modules. These different sub modules work independently and do not
interrupt the working of other. The first sub module includes the activity of capturing
image. The next module being the pre-processing module, this module takes in the input
from the previous module and processes it. It returns a preprocessed image which it
would now be suitable to process further. Then the next module that is edge detection
module detects the edges present in the image and removes the noise from the already
pre-processed image. After edge detection, comes the image segmentation module which
segments the image to detect the individual lines, words of each line and then crops the
characters present in each word. The character recognition module follows the image
segmentation module where the actual characters are recognized by it comparing the
individual cropped character images with the ones present in the database. Thus, none of
the modules work independently without affecting the operation of the other modules.
3.8
CHAPTER 4
PROJECT DESIGN
A Standalone Optical Character System for mobile camera phones can be viewed as a
combination of several subsystems each specialized to solving one of the several sub
problems. After the system has received an input image from a camera, there are several
preparative stages the data has to undergo before the actual recognition of characters can
take place.
The proposed system has the following subsystems listed in chronological order:
1. Image Capturing
2. Preprocessing
3. Segmentation
4. Feature Extraction
5. Character Recognition
All this sub-modules can be diagrammatically represented as follows:
2. Segmentation
When dealing with the segmentation of machine printed text, we can use histogram
projections for segmentation. Horizontal or vertical image projections work by summing
up either the rows or columns of the image into a 1-dimensional vector. This process can
be applied to either binary or normal images. These projections are helpful in telling us
how the image is composed along the different axes.
a. Extracting the lines
This type of projection is used to segment the different lines from an image. For a
horizontal projection, all we do is sum up each row into a vector. Each line is clearly
separated in the binary threshold of the sum. In order to find out where each line starts,
we just run through this binary vector until we find our first value equal to 1. We
continue to run through this binary vector until we find a value equal to 0; this will mark
the end of our line. Since we have the vertical start and end points of our line, we can go
back to the original image and extract it.
b. Extracting the words
Now that we have each horizontal line extracted, it is time to extract the words and then,
the characters. In a similar manner to using the horizontal projection, we will take the
vertical projection of the image, but before doing so, we also need to blur the image in
the horizontal direction to remove the small spaces between characters. This blur will
allow words to be segmented together.
Level 1 DFD
CHAPTER 5
IMPLEMENTATION DETAILS
5.1
METHODOLOGY
surface texture etc. Sobel operator identifies them and also provides smoothening effects
thus eliminating noise completely.
5.1.3
CHARACTER RECOGNITION
Now when the individual characters are extracted, the individual character image is
converted into pixels and compared with the pixilated images in the database. The
comparison is done by subtracting the corresponding pixels of both the images and
creating a new pixilated image of the difference pixels. After this, we take a ratio of the
black to the white pixels of this newly generated image. If the difference is within the
acceptable range then it is recognized as that particular character.
CHAPTER 6
TESTING
Sr. No.
1.
Module
Image Capture
2.
3.
Lighting throughout
image
4.
5.
Noise
Action
Expected
Result
Actual result
Pass
Capture blur
image
Capture
skewed image
Capture image
with
handwritten
text
Incorrect
Result
Incorrect
Result
Incorrect
Result
Incorrect
Result
Incorrect
Result
Incorrect
Result
Yes
Capture color
image
Capture Binary
image
Special
Characters in
the image
Image captured
with too much
RGB
components
Different
lighting in the
same image
Correct Result
Correct Result
Yes
Correct Result
Correct Result
Yes
Incorrect
Result
Incorrect
Result
Yes
Recognize
properly
Properly
recognized
Yes
Process
correctly and
return right
result
Correctly
recognize
Correctly
recognized
Yes
The cropped
characters are
resized and
correctly
recognized
The noise
removal is
done and the
characters are
correctly
recognized
Yes
Capture image
with nonuniform font
size throughout
the image
Too much
noise present
in the image
Characters
should be
correctly
recognized
Yes
Yes
Yes
CHAPTER 7
TIMELINE CHART
Sr.No.
1.
2.
3.
4.
5.
ACTIVITIES
Introduction &
Motivation
Review of Literature
Requirement
Analysis
Project Design
Implementation
Details
6.
Coding
7.
Testing
8.
9.
GNATT CHART
CHAPTER 8
We have successfully implemented our project as per the specifications. Our project has
culminated in the development of an application capable of recognizing the symbolic
characters appearing in the image. As was mentioned earlier, it will be easy to
electronically search or store it compactly after digitizing the text. We aim to provide a
baseline for developers who want to develop similar applications. Our project is a unique
and a genuine starting point for all those who want to work in this particular domain.
The project has been successful in catering to all the basic requirements which were
mentioned in the requirement specification. However we have not considered every type
of possible form and/or representation of the English characters. This mainly involves the
omission of words having special characters, numbers or words that are handwritten.
These inherent limitations are something we would like to work on and try to broaden our
potential scope as much as possible. We would like to extend our applications capabilities
so that it includes the entire spectrum of characters and numbers. We hope to impart a
grammar comprehensive ability so that the in case, some words that do not completely
appear in the image also be corrected after recognition. The application has
been
designed to work specifically on the android OS platform. We would like to extend this
ability and make it platform independent and highly generic. Also, we look forward to
provide text-to-speech facility integrated with the OCR application so that it would be a
boon for the visually challenged people.
References
Bibliography
[1]
Websites
[2]
http://stackoverflow.com/questions/8381514/android-converting-color-image-tograyscale
Papers
[3]
[4]
of Binarization
Methods 1995.
[5]
[6]
image to
[8]