View License

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

» Watch video

Highlights from
level set for image segmentation

  • drlse_edge(phi_0, g, lamb...This Matlab code implements an edge-based active contour model as an
  • demo_1.mThis Matlab code demonstrates an edge-based active contour model as an application of
  • demo_2.mThis Matlab code demonstrates an edge-based active contour model as an application of
  • View all files
4.8 | 33 ratings Rate this file 180 Downloads (last 30 days) File Size: 1.82 MB File ID: #12711 Version: 1.9
image thumbnail

level set for image segmentation


Chunming Li (view profile)


20 Oct 2006 (Updated )

This Matlab code implements an edge based geometric active contour model without reinitialization.

| Watch this File

File Information

This Matlab code implements a new level set formulation, called distance regularized level set evolution (DRLSE), proposed by Chunming Li et al's in the paper "Distance Regularized Level Set Evolution and its Application to Image Segmentation", IEEE Trans. Image Processing, vol. 19 (12), 2010

The main advantages of DRLSE over conventional level set formulations include the following: 1) it completely eliminates the need for dreinitialization; 2) it allows the use of large time steps to significantly speed up curve evolution, while ensuring numerical accuracy; 3) Very easy to implement and computationally more efficient than conventional level set formulations.

This package only implements an edge-based active contour model as one application of DRLSE. More applications of DRLSE can be found in other published papers in the following website:

MATLAB release MATLAB 6.5.1 (R13SP1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (40)
07 Feb 2017 Smith Adam

06 Dec 2016 diw sun

Thank trying image segmentation

02 Dec 2016 Ankita Wanchoo

I am trying to segment the tumor in my MRI image.It is not segmenting the actual region.Can you please help me with this?My email id is

21 Oct 2016 yue zhao

Excellent! Very robust and accurate, the code is simple and easy to use!

17 Oct 2016 Pragya Sharma

10 Aug 2016 Mohammad

Great job!

01 Apr 2016 Ligong Han

Ligong Han (view profile)

19 Nov 2015 A-J KHAN

Hi! i ues this code for cardic T2 W CMR IMAGES,the target is to detect the contours of LEFT VENTRICLE but i am fail can any one help me in this stage. thanks
My EMAIL address:

Comment only
27 Oct 2014 MEHMET FATIH

I tried to use this code for my microscope images but I failed. Segmentation starts in a little region upper left corner and code cant reach all region.

28 Jun 2014 abhilash B

please give us the link/code to calculate the mean error that you have used in the paper

17 Oct 2013 Xidian NO.1


19 Jun 2013 narjes

narjes (view profile)

hi,i tried to use this code but i always get error code :
??? Error using ==> contours
Too many input arguments.

Error in ==> C:\MATLAB6p5\toolbox\matlab\specgraph\contour3.m
On line 80 ==> [c,msg] = contours(varargin{1:nin});

Error in ==> C:\MATLAB6p5\toolbox\matlab\specgraph\contour.m
On line 62 ==> [c,h,msg] = contour3(varargin{:});

Error in ==> C:\MATLAB6p5\work\level.m
On line 51 ==> contour(phi, [0,0], 'r','LineWidth',2);title('Initial level set function');
can someone help me please?

Comment only
07 May 2013 lin

lin (view profile)

well good

Comment only
12 Jan 2012 Su Dongcai

Su Dongcai (view profile)

19 Dec 2011 ji

ji (view profile)

thanks for your help

12 Oct 2011 sun

sun (view profile)


Comment only
11 Jun 2011 akui

akui (view profile)


Comment only
10 Mar 2011 Samarjeet

thanks..good work :)

29 Aug 2010 atha lakuary

thanks for ur help :)

18 Jun 2010 Ankit Goyal


23 May 2010 Nitin

Nitin (view profile)

19 Jan 2010 TIAN RUONAN

thanks your help.

Comment only
07 Jun 2009 Radhika

I tried lip segmentation with this but the results are not veyr satifactory. Any suggestions as to what other algorithms can be used?


Comment only
07 Feb 2009 fido genial

Excellent job

12 Dec 2008 Sang-Hyuk Kim

Thank you. This code is very easy to use and performance is very good. This one is helpful for me.

15 Oct 2008 John Smith

It does not work on realistic images, I used examples from Columbia University Image Library

19 Sep 2008 shifang xu

Thank you for sharing!
Maybe there is a little bug at line 36 in Demo1_ManualBinaryInitial.m.
??? Error using ==> -
Function '-' not defined for variables of class 'uint8'.

Error in ==> E:\?????\????? ROI\Segment_1\LevelSet_ChunmingLi_v0\Demo1_ManualBinaryInitial.m
On line 36 ==> initialLSF= c0*2*(0.5-BW); % initial level set function: -c0 inside R, c0 outside R;

It can be fixed by changing BW to double(BW).

13 Aug 2008 Adam W

Thank you. It was very easy to get it to work on my computer.

24 Jul 2008 Ping Xiang

Good job. I have downloaded and try to modify and use it in my research.

19 Apr 2008 Ronfard Guallrier

Hi, Chunmingli, thank you for your programe, I have downloaded it. I also have visited your homepage, I found your CVPR07 paper is excellet. And, your code is awsome! But it is DLL file. Chunming, can you also uploade your source code for LBF? I am waiting for your reply...

19 Apr 2008 chiwister john

Excellent! I found his new work LBF is even better. It is insensitve to initlizations. His code can be downloaded from

05 Nov 2007 alex z


24 Aug 2007 miso yong

hmm do u use snakes to perform the energy forces? i need it because i need to track the lip movement for my project..if u did can you share your work with me?

07 Jun 2007 reza goli

Hi Chunming,
Thanks for your nice program. I only have one question?
Do you use normal and curvature forces in your implementation too, like the usual level set method?
Thanks again and waiting for your reply.


16 May 2007 Florian Jousset

19 Apr 2007 jianfei ge

Very good,thank you!

12 Apr 2007 Dan Hakim

very nice algorithem

11 Dec 2006 Y zz

06 Nov 2006 chenyu ke

30 Oct 2006 Jeff Jiang

Nice work!

25 Oct 2006

This new version allows user to specify initial contour/region manually.

26 Oct 2006

correct some typo

30 Oct 2006


30 Oct 2006


10 Nov 2006

add some comments in the code

22 Feb 2011 1.2

This level set method has been improved by Chunming Li in a recent paper, which can be download in his homepage in the following link:

22 Feb 2011 1.3

Added a note about an improvement of this method in the description.

15 Mar 2011 1.6

Upgrade the old method to a new one proposed by the same authors in a recently published paper.

03 Jun 2013 1.9

change "VIEW" as "view" in demo1 and demo2 for newer version of Matlab

Contact us