School of Science and Technology 科技學院
Computing Programmes 電腦學系

A Food Ingredient Consultation App

CHAN Yuk Kai Kylar, WONG Man Wai and YE Qing

  
ProgrammeBachelor of Science with Honours in Web Technologies
SupervisorDr. Raymond Pang
AreasSmart Living
Year of Completion2016

Objectives

The aim of this project is to give suggestion to the user when they are using smartphone to scan the packaged food label. We are going to develop a food ingredient consultation system to analysis the relationship between user personal data (age, food allergy, weight) with the packaged food ingredient. The warning message will occur when the user matches the risk factors, by doing that the accident rate will decrease.

To achieve the aim, the main objective is to develop a food ingredient consultation app that can read 1D barcode and food ingredient facts labels. Then provide health instructions suitable for normal users and warn the user when there are potential food allergens.

The project has defined a number of subobjectives as follows:

  • Scan and read 1D Barcode
  • Scan and read food ingredient facts label
  • Obtain data on ingredients, additives and nutrition facts
  • Analyze data on ingredients, additives and nutrition facts
  • Given Health suggestion to user

Background and Methodology

PHP is the most popular serverside language, so we integrate PHP with our application. It is very useful in accessing data on a web server in our android application.

An android activity represents the presentation layer of an Android application. An Android application can have more than one activities and each of the activity can be switched between them during the execution of the application. Besides, a fragment represents a behavior or a portion of user interface in an Activity. Develop can combine multiple fragments in a single activity to build a multipane UI and reuse a fragment in multiple activities.

Barcode Scanner function is completed in our project. It does not need an elegant design because its only task is to read the barcode on the food package. The only design layout is a button and full screen camera. When scanning the barcode, the ZBar Barcode Scanner will get notified and send the result to BarcodeScanner Activity as soon as the result occurred. Users actually no need to press any button after turning on the scanner.

Text Detection can locate the text area on the screen. It is a function provided by OpenCV. It will draw a red rectangular box on the screen and capture the parts of the image inside the box. Therefore, the later processings including image processing and character recognition will only focus on these parts and ignore the irrelevant. It has two benefits. One is that it speeds up the later processing because the amount of pixel need to be processed is reduced. Another benefits is that it can reduce the noise of the image because it crops the nontext part out of the image. These nontext parts can create some noise after thresholding.

For the UI design, we choose fragment instead of activity. With this approach, a user does not need to retrieve the previously page. After the evaluation, most of the audience can learn to use this application by themselves. The audience was pointing out the instrument of the layout design is clear and helpful. We believe that this app is easy enough for our target audience.

The design of this module is letting the users retry capturing the image of the ingredient label until all ingredient is recognized. When the users capture an image, it will send to OCR library to do recognition. The outcome will display on the screen. If the users find out that some ingredient is missing, they can capture another image again to get more outcome. Instead of replacing the previous outcome, the new outcome will extend the previous one. Therefore, more ingredients will be recognized with more capturing.

Evaluation

This assessment is evaluating our target audience acceptation degree of our food ingredient consultation application. We choose questionnaire as evaluation medium, which is practical, easy to collect and the result can be quickly and easily quantified. However, this approach is hard to evaluate how truthful a respondent is being. Therefore, we also collect the audience feedback as the ending question. In our questionnaire, we investigate three kinds of user: Housewife, Office Worker; IT worker. This application target user is a housewife but we also want to gain wider opinion from other people. Therefore, half of our questionnaires answered by housewife.

Acquiring the Essential Data: If a user cannot access the data then means the app is not feasible. Consider food package might frequently update that means the data might not consist and accurate. From the chart below we can see that more than 75% of audience satisfied with the app, 25% audience not so satisfied. Consider there may be security, technical or legal barriers to data access, this app does not feasible enough.

Maintaining Conceptual Integrity on Mobile Platform: Evaluate the app whether or not run fast enough on mobile platform. From the chart below, 80% audience pleased with the account setup, which means the installation flow is evident and easy to understand.

Effectiveness: The degree to which the food ingredient Android mobile application serves the target user. In mobileuserscenarios our application suitable for user shopping in supermarket. This question shows the functionality of this application, and the outcome could reflect how effectiveness this application does. Most audience 68.4% give three mark which is in the middle. Therefore, they believe this app is somewhat useful to them.

The risk of Privacy: The degree to which the user private. This question reflects the degree of security of this app. Over half 65% interviewer thinks the security is satisfied. As the application do not need to lost of sensitive personal data from user, so more than half of the interviewees accept the security level of this application.

Conclusion and Future Development

Besides the above responses, the interviewees also give us some useful suggestions for future development. For example, they suggest that the app should provide more languages and localization. They also think that we can extend our app to other allergen such as metal, animal skin tissue, dust mites etc. People think that the app can add other information to the users, for instance, the firstaid can we do after we eat some allergen by mistake.

Copyright Chan Yuk Kai Kylar, Wong Man Wai, Ye Qing and Raymond Pang 2016

Jonathan Chiu
Marketing Director
3DP Technology Limited

Jonathan handles all external affairs include business development, patents write up and public relations. He is frequently interviewed by media and is considered a pioneer in 3D printing products.

Krutz Cheuk
Biomedical Engineer
Hong Kong Sanatorium & Hospital

After graduating from OUHK, Krutz obtained an M.Sc. in Engineering Management from CityU. He is now completing his second master degree, M.Sc. in Biomedical Engineering, at CUHK. Krutz has a wide range of working experience. He has been with Siemens, VTech, and PCCW.

Hugo Leung
Software and Hardware Engineer
Innovation Team Company Limited

Hugo Leung Wai-yin, who graduated from his four-year programme in 2015, won the Best Paper Award for his ‘intelligent pill-dispenser’ design at the Institute of Electrical and Electronics Engineering’s International Conference on Consumer Electronics – China 2015.

The pill-dispenser alerts patients via sound and LED flashes to pre-set dosage and time intervals. Unlike units currently on the market, Hugo’s design connects to any mobile phone globally. In explaining how it works, he said: ‘There are three layers in the portable pillbox. The lowest level is a controller with various devices which can be connected to mobile phones in remote locations. Patients are alerted by a sound alarm and flashes. Should they fail to follow their prescribed regime, data can be sent via SMS to relatives and friends for follow up.’ The pill-dispenser has four medicine slots, plus a back-up with a LED alert, topped by a 500ml water bottle. It took Hugo three months of research and coding to complete his design, but he feels it was worth all his time and effort.

Hugo’s public examination results were disappointing and he was at a loss about his future before enrolling at the OUHK, which he now realizes was a major turning point in his life. He is grateful for the OUHK’s learning environment, its industry links and the positive guidance and encouragement from his teachers. The University is now exploring the commercial potential of his design with a pharmaceutical company. He hopes that this will benefit the elderly and chronically ill, as well as the society at large.

Soon after completing his studies, Hugo joined an automation technology company as an assistant engineer. He is responsible for the design and development of automation devices. The target is to minimize human labor and increase the quality of products. He is developing products which are used in various sections, including healthcare, manufacturing and consumer electronics.

Course Code Title Credits
  COMP S321F Advanced Database and Data Warehousing 5
  COMP S333F Advanced Programming and AI Algorithms 5
  COMP S351F Software Project Management 5
  COMP S362F Concurrent and Network Programming 5
  COMP S363F Distributed Systems and Parallel Computing 5
  COMP S382F Data Mining and Analytics 5
  COMP S390F Creative Programming for Games 5
  COMP S492F Machine Learning 5
  ELEC S305F Computer Networking 5
  ELEC S348F IOT Security 5
  ELEC S371F Digital Forensics 5
  ELEC S431F Blockchain Technologies 5
  ELEC S425F Computer and Network Security 5
 Course CodeTitleCredits
 ELEC S201FBasic Electronics5
 IT S290FHuman Computer Interaction & User Experience Design5
 STAT S251FStatistical Data Analysis5
 Course CodeTitleCredits
 COMPS333FAdvanced Programming and AI Algorithms5
 COMPS362FConcurrent and Network Programming5
 COMPS363FDistributed Systems and Parallel Computing5
 COMPS380FWeb Applications: Design and Development5
 COMPS381FServer-side Technologies and Cloud Computing5
 COMPS382FData Mining and Analytics5
 COMPS390FCreative Programming for Games5
 COMPS413FApplication Design and Development for Mobile Devices5
 COMPS492FMachine Learning5
 ELECS305FComputer Networking5
 ELECS363FAdvanced Computer Design5
 ELECS425FComputer and Network Security5