Giter Site home page Giter Site logo

food-segmentation's Introduction

Food-Segmentation

Introduction

This is a project that segmented foods in photographs via an active contour algorithm. The project is the semester project of Professor Hoover's course ECE6310 in Clemson University.

Implementation

The goal is to implement an active contour algorithm that allows a user to semi-automatically segment food items in a photograph of multiple foods on a dinner plate. The program must load a color PNM image but only needs to display the greyscale version (average of the three color bands). Users have the following options: left-click to draw around a food item that subsequently automatically shrinks to wrap to the food boundary; right-click a point within a food item that subsequently automatically grows a contour to its outer boundary; shift-click (either button) to manually drag a contour point to a new location.

There are several energy terms being considered.Three internal energy terms includes the distance between points, the deviation from the average distance between points, and the distance to the centroid of the current contour. Three external energy terms includes the image Sobel edge gradient magnitude, the average intensity within the contour, and the Canny edge gradient magnitude.

Besides, the project files integrates a region grow algorithm that could grow a region from a point in a photograph. However, the region grow algorithm only works well on objects with obvious edges.

Dependencies

The project requires:

  • Window 8 SDK
  • Visual Studio 2017 or above

Files

  • Emerge.sln: the structure file for VS.
  • Emerge.exe: the executable file of the project.
  • main.c: the C code of the GUI.
  • ActiveContour.c: the C code of the active contour algorithm
  • RegionGrow.c: the C code of the region grow algorithm.

Examples

Here are some examples of food segmentation in growing mode.

Growing Coutour Examples

Growing Coutour Examples

Growing Coutour Examples

Here are some examples of food segmentation in shrinking mode.

Shrinking Coutour Examples

Shrinking Coutour Examples

Shrinking Coutour Examples

Shrinking Coutour Examples

food-segmentation's People

Contributors

zeyut avatar

Watchers

James Cloos avatar

Forkers

xiaochengcike

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.