Skip to main content

Minimal path extraction using the fast marching method

Project description


PyPI version Build status Documentation Status Coverage Status Supported Python versions License

scikit-mpe is a package for extracting a minimal path in N-dimensional Euclidean space (on regular Cartesian grids) using the fast marching method.



pip install -U scikit-mpe


Here is a simple example that demonstrates how to extract the path passing through the retina vessels.

from matplotlib import pyplot as plt

from import retina
from skimage.color import rgb2gray
from skimage.transform import rescale
from skimage.filters import sato

from skmpe import mpe

image = rescale(rgb2gray(retina()), 0.5)
speed_image = sato(image)

start_point = (76, 388)
end_point = (611, 442)
way_points = [(330, 98), (554, 203)]

path_info = mpe(speed_image, start_point, end_point, way_points)

px, py = path_info.path[:, 1], path_info.path[:, 0]

plt.imshow(image, cmap='gray')
plt.plot(px, py, '-r')

plt.plot(*start_point[::-1], 'oy')
plt.plot(*end_point[::-1], 'og')
for p in way_points:
    plt.plot(*p[::-1], 'ob')



The full documentation can be found at

(The documentation is being written)




Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for scikit-mpe, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size scikit_mpe-0.1.1-py3-none-any.whl (11.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size scikit-mpe-0.1.1.tar.gz (11.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page