No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Image Segmentation

This is an implementation of an image segmentation program which segments an image's foreground and background written in matlab. The program uses an implementation of max-flow/min-cut using Boykov-Kolmogorov's algorithm written in c++ with a wrapper for matlab.


This file creates edges where each node is connected to its four adjacent neighbors on a height x width grid.

This is a GUI script will open a small window that will allow the user to segement forground objects in a picture by selecting background and forground objects.

Containes one function which creates a sparse matrix connecting the graph vertices with calculated weights.

Compiles the max flow algorithm.

Contains the implementation of the max-flow/min-cut algorithm.

Creates a sparse tree and calculates weights for each pixel connecting them to each other, foreground, and background. Then utilizes the min-cut algorithm to segment the forground and background for a RGB piture.

Takes similar steps as segment_image_color.m but for a gray scale image. This makes the process more simple.