SkillAgentSearch skills...

Chanvese

Chan-Vese level-sets in Python

Install / Use

/learn @kevin-keraudren/Chanvese
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Chan-Vese level-sets in Python

Numpy adaptation of the Chan-Vese level-sets code from creaseg (http://www.creatis.insa-lyon.fr/~bernard/creaseg/). The relevant file from the original source code is in the creaseg/ folder.
The code from Burak Bayramli (http://ascratchpad.blogspot.com/2011/03/image-segmentation-using-active.html) has been useful when performing this adaptation.

The Chan-Vese level sets model aims at minimizing the energy:

Chan-Vese equation

where I is the image, C is the boundary of the segmented region, c_1 and c_2 are the averages of I respectively inside and outside C, and kappa is the curvature of C.

Example

python chanvese.py

<img src="levelset.gif" height="200">

Reference

T. Chan and L. Vese. "Active contours without edges". IEEE Transactions on Image Processing. Volume 10, pp. 266-277, February 2001.

Related Skills

View on GitHub
GitHub Stars94
CategoryDevelopment
Updated3mo ago
Forks40

Languages

TeX

Security Score

77/100

Audited on Dec 25, 2025

No findings