Scikit image

from Wikipedia, the free encyclopedia
scikit-image

Scikit-image logo.png
Basic data

Current  version 0.17.2
( July 6, 2020 )
operating system Platform independent
programming language Python , Cython
License BSD license
scikit-image.org

scikit-image (formerly scikits.image) is a free software - library for image processing for the programming language Python . It contains algorithms for segmentation, geometric transformations , color space manipulation, analysis, filtering, morphology , feature recognition and more. As SciKit (short for SciPy Toolkit), like Scikit-learn , for example , it is based on the numerical and scientific Python libraries NumPy and SciPy .

implementation

Scikit-image is largely written in Python. Some core algorithms were implemented in Cython for performance reasons.

example

Scikit-image CornerDetection.jpeg

In this example, a checkerboard pattern data.checkerboard () is generated and then distorted with an affine mapping . After further elements have been added to the image, corner points are determined using the Harris Corner Detector, an interest operator .

from matplotlib import pyplot as plt

from skimage import data
from skimage.feature import corner_harris, corner_subpix, corner_peaks
from skimage.transform import warp, AffineTransform
from skimage.draw import ellipse

# Wir erzeugen eine Affine Abbildung des Schachbrettmusters data.checkerboard()
tform = AffineTransform(scale=(1.3, 1.1), rotation=1, shear=0.7, translation=(210, 50))
image = warp(data.checkerboard(), tform.inverse, output_shape=(350, 350))

# Ellipse zeichnen
rr, cc = ellipse(310, 175, 10, 100)
image[rr, cc] = 1

# zwei Rechtecke zeichnen
image[180:230, 10:60] = 1
image[230:280, 60:110] = 1

# Mit Hilfe des Harris Corner Detectors Eckpunkte ermitteln
coords = corner_peaks(corner_harris(image), min_distance=5)
coords_subpix = corner_subpix(image, coords, window_size=13)

fig, ax = plt.subplots()
ax.imshow(image, interpolation='nearest', cmap=plt.cm.gray)
ax.plot(coords[:, 1], coords[:, 0], '.b', markersize=3)
ax.plot(coords_subpix[:, 1], coords_subpix[:, 0], '+r', markersize=15)
ax.axis((0, 350, 350, 0))
plt.show()

Web links

See also

Individual evidence

  1. Release 0.17.2 . July 6, 2020 (accessed July 7, 2020).
  2. Emmanuelle Gouillart: Scikit-image: image processing - Scipy lecture notes. In: Tutorials on the scientific Python ecosystem: a quick introduction to central tools and techniques. Accessed August 31, 2018 .
  3. Eric Chiang: Image Processing with Scikit-Image. In: The Yhat Blog. January 30, 2014, accessed August 31, 2018 .