This module is an implementation of the Mean Curvature Flow with constraints. The available code was used to generate the examples here.
The mean curvature flow (MCF) deforms a hypersurface in the normal direction with a speed proportional to its mean curvature. An example of a constrained MCF is the evolution of a closed planar curve enclosing an unique object. This code evolves a curve drawn around a single object picture, the evolution stops at the points which reach the object.
- pycuda
- PIL
- pylab
- numpy
- matplotlib
- Edit line 18 in "ImageRec_v4.py" to select the image.
- Run "ImageRec_v4.py".
For Python 3.X, 'print' syntax must be modified.- A new version for Python 3 is now included: ImageRec_v4_PY3.py.