File Exchange

image thumbnail

Active contour platform

version 1.12 (3.6 MB) by

Compare the performance of different level sets and active contours methods.

60 Downloads

Updated

View License

Free open source software in Matlab for the evaluation of the performance of different level-set based algorithms in the context of image segmentation. The platform gives access to the implementation of six level-set methods that have been chosen in order to cover a wide range of data attachment terms (contour, region and localised approaches). The software also gives the possibility to compare the performance of the proposed algorithms on any kind of images. The performance can be evaluated either visually, or from similarity measurements between a reference and the results of the segmentation.

1.) Download
2.) Unzip
3.) Run >>creaseg

See this site for experiments, videos, and more information on creaseg project:
[http://www.creatis.insa-lyon.fr/~bernard/creaseg/]

Comments and Ratings (25)

Amy Lee

Hello,the website [http://www.creatis.insa-lyon.fr/~bernard/creaseg/] cannot be open up.

Thanos

Thanos (view profile)

Hey Olivier,
I also get the following error when trying to open an image... :

>>creaseg_loadimage
Attempt to reference field of non-structure array.

Error in creaseg_loadimage (line 101)

 
Error using MException/rethrow
RETHROW can only throw a previously caught exception.

Error in matlab.ui.internal.dialog.FileSystemChooser/PathParser (line 87)
                    rethrow(newEx);

Error in matlab.ui.internal.dialog.FileSystemChooser/set.InitialPathName (line 32)
                iPath = PathParser(obj,iPath);

Error in uigetputfile_helper (line 44)
ufd.InitialPathName = dialog_pathname;

Error in uigetfile (line 127)
    [filename, pathname, filterindex] = uigetputfile_helper(0, varargin{:});

Error in creaseg_loadimage (line 104)

 
Error while evaluating uimenu Callback

ziwei wei

Very Good

Rasoul

Rasoul (view profile)

Hi Oliver,

I am very interested in using your code.

When I download and unzip, I open the creaseg.m function and run it. There's a GUI which opens. When I click on "Open File" icon,
this is the error:

Error using MException/rethrow
RETHROW can only throw a previously caught exception.

Error in matlab.ui.internal.dialog.FileSystemChooser/PathParser (line 87)
rethrow(newEx);

Error in matlab.ui.internal.dialog.FileSystemChooser/set.InitialPathName (line 32)
iPath = PathParser(obj,iPath);

Error in uigetputfile_helper (line 44)
ufd.InitialPathName = dialog_pathname;

Error in uigetfile (line 127)
[filename, pathname, filterindex] = uigetputfile_helper(0, varargin{:});

Error in creaseg_loadimage (line 104)
[fname,pname] = uigetfile('*.png;*.jpg;*.pgm;*.bmp;*.gif;*.tif;*.dcm;','Pick a file','multiselect','off','data/Image');

Error while evaluating PushTool ClickedCallback

What am I doing wrong?

Looking forward to your reply,

Regards.

DC

DC (view profile)

Thank you for this submission. It gave me a head start on understand how level sets work.

However, I have some concerns over the geodesic implementation you have provided. I think you over normalise. For example, the propagation force is normalised , the scalar product is normalised and the level set normal is also normalised.

Please consider the case when a contour wraps around a region of high gradient. Usually this would terminate the contour but in your system the values are normalised to one and so the magnitude of low evolution forces are boosted. This enables the contour to move over high gradients. I think the equation should be:

F=(FdotGrad)-(propag.*g(idx))

F2=F./max(abs(F))+(g(idx).*curvature)

F2=F2.*(g(idx))

I think the normGrad term can be ignored as its the edge indicator which is of importance

Hi Oliver,

I am very interested in using your code.

When I download and unzip, I open the creaseg.m function and run it. There's a GUI which opens. When I click on "Open File" icon,
this is the error:

Error using MException/rethrow
RETHROW can only throw a previously caught exception.

Error in matlab.ui.internal.dialog.FileSystemChooser/PathParser (line 87)
                    rethrow(newEx);

Error in matlab.ui.internal.dialog.FileSystemChooser/set.InitialPathName (line 32)
                iPath = PathParser(obj,iPath);

Error in uigetputfile_helper (line 44)
ufd.InitialPathName = dialog_pathname;

Error in uigetfile (line 127)
    [filename, pathname, filterindex] = uigetputfile_helper(0, varargin{:});

Error in creaseg_loadimage (line 104)
    [fname,pname] = uigetfile('*.png;*.jpg;*.pgm;*.bmp;*.gif;*.tif;*.dcm;','Pick a file','multiselect','off','data/Image');
 
Error while evaluating PushTool ClickedCallback

What am I doing wrong?

Looking forward to your reply,

Regards.

Dark

Dark (view profile)

Mohamed

Mohamed (view profile)

olivier bernard

Hi Gregoris,

Thanks for your interest in creaseg. In order to obtain the binary mask of the segmentation result, you just have to save the result as a mat file thanks to the menu bar and then threshold the level set result putting to 1 all the values lower than 0 and to 0 all the values higher than 0.

Best regards,
Olivier

Gregoris

Hi Oliver,

Great program. Is there any simple way to export only the segmentation mask (black and white image) so i can use it for further processing?

Tank you

Siro

Siro (view profile)

Hi Olivier,
when trying to open an image () the following messages come up:

Error using MException/rethrow
RETHROW can only throw a previously caught exception.

Error in matlab.ui.internal.dialog.FileSystemChooser/PathParser (line 86)
                    rethrow(newEx);

Error in matlab.ui.internal.dialog.FileSystemChooser/set.InitialPathName (line 31)
                iPath = PathParser(obj,iPath);

Error in uigetputfile_helper (line 50)
ufd.InitialPathName = dialog_pathname;

Error in uigetfile (line 128)
    [filename, pathname, filterindex] = uigetputfile_helper(0, varargin{:});

Error in creaseg_loadimage (line 104)
    [fname,pname] = uigetfile('*.png;*.jpg;*.pgm;*.bmp;*.gif;*.tif;*.dcm;','Pick a
    file','multiselect','off','data/Image');
 
Error while evaluating uimenu Callback

I use Matlab R2011b: it's maybe the cause? Ty a lot
Siro

Danelle

Javier

Javier (view profile)

Or maybe the fault are of the parameters? I'm using the default ones.

Javier

Javier (view profile)

Hi Olivier,

Thank you for sharing your excellent platform. I'm using the Shi's method in medical images. The problem is that my initial contour is always defined as a circle of radius 5 pixels with a detected center, to be automatic. But sometimes the anatomic part that I want to segment is very homogeneous, as the surrounded tissue and the level set goes and never stops. Is there a way I can make a particular contrast to every detection in order to improve the segmentation with Shi's?

Thank you very much!

Jaejin Hwang

Hello, is there way we can manually edit contour after running methods? Thanks.

Olivier

Hi lukai,

Thanks for your interest in creaseg. The reason why we force the image to be in gray level is that this project comes from a medical context where must of the image are not represented in the color space.

lukai xu

Hi olivier:
I'm very interested in your this little program.It's great!But I have a question to ask you Why make the original image transformed to gray image? thanks

bmv

bmv (view profile)

Several proposals to improve the functionality:
Support for input type double and single. In particular, after I removed or changed in the creaseg_bernard.m the following lines:
display = false;
% Img = im2graydouble (img);
% Fig = findobj (0, 'tag', 'creaseg');
% Ud = get (fig, 'userdata');
% Set (ud.txtInfo1, 'string', sprintf ('iteration:% d', its), 'color', [1 1 0]);
% ShowCurveAndPhi (phi, ud, color);
% Drawnow;
% Set (ud.txtInfo1, 'string', sprintf ('iteration:% d', its), 'color', [1 1 0]);
% Drawnow;
% ShowCurveAndPhi (phi, ud, color);
нour function has easily processed my data.

This problem can be solved in the following ways:
1) In the functions to check input data type.
2) In the GUI to implement support for loading images from a mat-file, or variables from workspace.

bmv

bmv (view profile)

olivier bernard

Hi x :)
The new update of Creaseg has fixed that problem that appears with some matlab versions.

Moreover now there is no need to have a spline toolbox for contour interpolation.

Olivier Bernard

x

x (view profile)

When I run creaseg, following error message comes up:
??? Operands to the || and && operators must be convertible to logical scalar values.

Error in ==> creaseg_gui at 103
    if ( (length(a(i).Version)>3) || (a(i).Version >= '7.6') )

Error in ==> creaseg at 106
    creaseg_gui();

Please let me know what's the problem and how to resolve. Thanks!

Hi Siyi. Thanks for your interest in Creaseg. We've just updated a new version of creaseg that deals with the reported bugs and without the need of the spline toolbox.
Best regards
Olivier Bernard

Siyi Deng

Siyi Deng (view profile)

Neat GUI tool, very helpful for developing image segmentation algorithms. Howerver it seems to give red error messages sometimes, maybe because I abused it? lol. Also seems to require the spline toolbox?

Siyi Deng

Siyi Deng (view profile)

inhwan song

Thank you for your matlab source codes ^^
I really really appreciate you
I have a question~
Do you know..If I modify your source code (level set => multiphase level set), How many things change?
Would you give me some idea??

Updates

1.12

Updated to include an app file for R2012B

1.11

- now no need of any spline toolbox
- correct some bugs that appear with new version of matlab

1.10

Now you don't need any spline toolbox

1.7

The bugs mostly concerning the version tests are fixed.

1.6

fix a bug concerning the matlab version checking

1.5

* Better deal with initialisation drawing
* Better deal with reference drawing

MATLAB Release
MATLAB 8.0 (R2012b)

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

» Watch video