Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 993 Bytes

README.md

File metadata and controls

25 lines (20 loc) · 993 Bytes

The Yellow Diet.com

Image uploader with rgb-averager

Upload a picture of your food to find out the average rgb value of the subject and if it follows the Yellow Diet principles.

Try it here: www.theyellowdiet.com, or remix it on Codepen.

Project scope:

Extract the pixel data from an uploaded picture to average the rgb value and compare it to the arbitrary threshold to determine if the subject falls in the yellow color spectrum.

Lessons learned:

  • Work with HTML Canvas.
  • Post image to canvas
  • Extract information from canvas
  • Function callbacks

Wishlist:

  • Improved UI
  • Placeholder image icon
  • Improved image subject filtering (ignore plates, tables etc.)
  • Implement Machine learning (Brain.js library or Tensor Flow JS) with validation from user to improve results over time.