View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Active Contours implementation & test platform GUI

4.9 | 9 ratings Rate this file 59 Downloads (last 30 days) File Size: 2.45 MB File ID: #30284 Version: 1.6
image thumbnail

Active Contours implementation & test platform GUI


Nikolay S. (view profile)


03 Feb 2011 (Updated )

Implementation and demonstration of several active contours segmentation methods.

| Watch this File

File Information

This program was written as a part of the “Medical Imaging” course. Together with Alex Blekhman ( my partner we have implemented the paper "Active Contours without Edges" by Tony Chan and Luminita Vese. We wrapped it up with a GUI to allow easy parameters change and segmentation process view and results storage for future analysis.
Later on we have added two existing implementation of additional methods to compare between the methods, and to learn each. The method are:
Implementation of "Level Set Evolution Without Re-initialization: A New Variational Formulation" in Proceedings of CVPR'05, vol. 1, pp. 430-436.
Author: Chunming Li, all rights reserved.
Implementation of "Localizing Region Based Active Contours" in “Image Processing, IEEE Transactions on “ im Nov. 2008 by Lankton and Tannenbaum.
Coded by: Shawn Lankton (
This is the place to thank both authors for the code contribution.
The users who download this code are welcome to play with it, to try and learn the above segmentation schemes. Moreover, additional methods can be added, and the GUI may serve as a convenient platform for segmentation methods understanding, analysis and comparisons.
Best segmenting you all!


An Intuitive Introduction To Kalman Filter inspired this file.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.9 (R2009b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (21)
22 Jan 2017 Md. Hasnat

03 Oct 2016 Nikolay S.

Nikolay S. (view profile)

Good evening to Saeid Shakeri & Reshma P M, and all the users of this submission.
I believe the bug you have reported is fixed now. Credits for sending me the file that caused the problems go to Nathan Bates.
Thanks for your help Nathan!

Comment only
15 May 2016 Nikolay S.

Nikolay S. (view profile)

Good day Saeid Shakeri.
Please contact me using my email (available in my user profile), and I'll see what can be done.

Comment only
15 May 2016 saeid shakeri

I have Reshma P M problem, too.
can everyone help me?
(MATLAB R2013a)

03 May 2016 Nikolay S.

Nikolay S. (view profile)

Hi Reshma P M.
Thanks for the high grading
I propose emailing me (see my profile), with precise description of the issue you have. I've tried running the code, and it worked fine, so I'll need your help to reproduce the error.
Best regards.

Comment only
19 Apr 2016 Reshma P M

The left hand side is initialized and has an empty range of indices.
However, the right hand side returned one or more results.

Error in ==> ActiveCountorsGUI>RunButton_Callback at 659

Error in ==> gui_mainfcn at 96

Error in ==> ActiveCountorsGUI at 42
gui_mainfcn(gui_State, varargin{:});

Error in ==>
can someone pls help wid dis error?

28 Aug 2015 SHERRY

SHERRY (view profile)


04 Nov 2014 Kwstas Tranos

Can anyone help me to implement the equation (27) in Lankton's paper .I compure the a and r for all the contours but i can not understand how to take the max and min in equation (27).If i use matlabs max i take the bigger elements between the two matrices .Is this wright?

30 Sep 2014 Kwstas Tranos


Comment only
11 Sep 2014 Kwstas Tranos

Does anyone no how we get from equation (17) of Lankton's paper to matlab F for Yezzi
F = -((u-v).*((I(idx)-u)./Ain+(I(idx)-v)./Aout)).Any help?

Comment only
28 Jul 2014 Kwstas Tranos

Dear Nikolay,

Thank you for your reply.
The "Segmenting multiple Objects " is part of the paper of Lankton "Localizing Region Based Active Contours" is the part IV.
I do not know if it is implemented in Matlab.
Thank you again.

27 Jul 2014 Nikolay S.

Nikolay S. (view profile)

Hi kwstas.
Thank you for the high grade.
I'm unfamiliar with the paper "Segmenting multiple Objects" by Shawn Lankton, and was not able to find it.
Any-hows, this GUI is proposed for Active contour algorithms evaluation. Thus a paper to be added must be:
- related to Active Conoturs
- implemented in Matlab
- Modified to fit GUI demands.
In additoin I must have the time to add it to this submission. Unfortunately I'm quiet busy those days, working on several submissions to Matlab Central File Exchange, and I'm afraid I will not have time to invest in this in the near future.
if the above conditions will be true, try emailing me, and I'll see what can be done.
Best regards,

Comment only
27 Jul 2014 Kwstas Tranos

Thank you very much for the GUI.Can you add tha part of Shawn Lankton paper about "Segmenting multiple Objects" ?
Thank you again

17 Oct 2013 Xidian NO.1

14 Jul 2013 S

S (view profile)


Whenever I am trying to run this application (when I click 'Run' in GUI) for any images and any model, I am getting the following error,

The left hand side is initialized and has an empty range of indices.
However, the right hand side returned one or more results.

Error in ActiveCountorsGUI>RunButton_Callback (line 659)

Error in gui_mainfcn (line 96)

Error in ActiveCountorsGUI (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)ActiveCountorsGUI('RunButton_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating uicontrol Callback

Did anyone happen to come across something like this?

Comment only
05 Feb 2013 Nikolay S.

Nikolay S. (view profile)

Hi Javier.
Thank you for the flattering words and grade- it's a pleasure.
Unfortunately there is only a little info I can recall as this code was written back in 2009, so I do not remember the details. I do advice you to go to the relevant papers. As far as I remember most parameters are similar and intuitive, so once you'll get it for the first paper, you'll get the rest quickly.
You're also advised to "play" with the GUI values to see how the value influences of the parameter change on segmentation results (this was the motivation for building this GUI btw).
Best regards,

Comment only
05 Feb 2013 Javier

Javier (view profile)

Hi, thank you for sharing this GUI, it's wonderful. Please, could you explain what are the parameters of each algorithm, and how their values affect to the segmentation result? Thank you

13 Jul 2012 Nikolay S.

Nikolay S. (view profile)

Hello Anders Munk-Nielsen. imshow is a function part of Matlab Image Processing Toolbox. See the Required Products list for this submition- Image Processing Toolbox is there... You can run this GUI on on a PC where Matlab and Image Processing Toolbox are installed.

Comment only
13 Jul 2012 Anders Munk-Nielsen

I get the following error when I try to run it:
Undefined function 'imshow' for input arguments of type 'uint8'.
Is that the missing toolbox messing with me?

Comment only
15 Aug 2011 Nikolay S.

Nikolay S. (view profile)

Good morning Luis.
Thanks for your comment.
I've checked this issue with "depfun". Signal processing toolbox is needed for gausswin command(which can be replcaed). Statistics Toolbox is not needed- I haven't found any fnction from this toolbox in the code, and I was able to run the GUI properly, on Matlab instalation without this toolbox.

Comment only
12 Aug 2011 Luis

Luis (view profile)

I believe this submission requires Statistics Toolbox and Signal Processing Toolbox.

Comment only
04 Feb 2011 1.2

Acknowledge added

24 Apr 2011 1.3

Modifications of Tool and Menu bars. Help and About added.

28 Jun 2011 1.4

Some significant updates added (marked by red ellipses in Screen-shot)

Changes list in 1.04:
* Color space panel added
* Blur (denoise) panel added
* Mask definition tool changed

See about help file for details.

15 Feb 2013 1.5

Minor changes:
- Packaged into an App, for easier use.
- fileparts output arguments modified, to cope with function change.

03 Oct 2016 1.6

Finally file name related bug is fixed!

Contact us