No BSD License  

Highlights from
GrowCut Image Segmentation

4.6 | 8 ratings Rate this file 91 Downloads (last 30 days) File Size: 92.1 KB File ID: #19091 Version: 1.0
image thumbnail

GrowCut Image Segmentation


Shawn Lankton (view profile)


06 Mar 2008 (Updated )

GrowCut Image Segmentation for binary segmentation, implemented in Matlab/C++ with mex

| Watch this File

File Information

I came across a cute segmentation idea called "GrowCut" []. This paper by Vladimir Vezhnevets and Vadim Konouchine presents a very simple idea that has very nice results. I always feel that the simplest ideas are the best!


This algorithm is presented as an alternative to graph-cuts. The operation is very simple, and can be thought of with a biological metaphor: Imagine each image pixel is a "cell" of a certain type. These cells can be foreground, background, undefined, or others. As the algorithm proceeds, these cells compete to dominate the image domain. The ability of the cells to spread is related to the image pixel intensity.

The authors give some pseudocode that very concisely describes the algorithm.

//for every cell p
for all p in image
  //copy previous state
  labels_new = labels;
  strength_new = strength;
  // all neighbors q of p attack
  for all q neighbors
      labels_new(p) = labels(q)
      strength(p) = strength_new(q)
    end if
  end for
end for

See more and some experiments here:

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (10)
21 Apr 2015 Evan Yao

Exactly what I needed and it compiled on my 32-bit machine. Speed was impressive

21 Apr 2015 Evan Yao  
22 Dec 2014 Meghana Dinesh

I use R2014b (64-bit). Am I required to do any changes?

This is the error I am getting:

Error using mex
C:\Users\MeghanaDK\Downloads\growcut\growcutmex.cpp not found; check that you are in the correct current folder, and check
the spelling of 'C:\Users\MeghanaDK\Downloads\growcut\growcutmex.cpp'.

Error in growcut (line 37)
mex growcutmex.cpp;

Error in growcut_test (line 12)
[labels_out, strengths] = growcut(img,labels);

Comment only
11 Mar 2014 Hazem

Hazem (view profile)

Excellent! Exactly what I needed. Fortunately for me, it compiled on my 64-bit machine

15 Nov 2011 Baek

Baek (view profile)


I'm sorry that I couldn't compile growcutmex.cpp file.
Because "matix.h" isn't exsited in your all files.
How can I do?

21 Dec 2010 Suresh Deoda  
05 Jul 2010 Mohamed Aissiou

very impressive!
is it possible to customize the accuracy ? and how long to segment that flower?
I am working on medical images segmentation, using signal gradient and signal histograms limited by regions.

19 Jan 2010 TIAN RUONAN

thanks for your share .

Comment only
14 Apr 2008 James Malcolm

Simple interface and very fast. It's a handy algorithm to have around and makes for a simple quick segmentation method to try.

31 Mar 2008 priyanka desai

Can this be used for Video please let me know , thanks in advance

14 Mar 2008

Fixed typo, added screenshot

10 Apr 2008

fixed typos, added new keywords

Contact us