Navigation

Documentation Home

 

Contents

Version

skimage

Image Processing SciKit (Toolbox for SciPy)

scikits-image (a.k.a. skimage) is a collection of algorithms for image processing and computer vision.

The main package of skimage only provides a few utilities for converting between image data types; for most features, you need to import one of the following subpackages:

Subpackages

color
Color space conversion.
data
Test images and example data.
draw
Image drawing primitives (lines, text, etc.).
exposure
Image intensity adjustment (e.g., histogram equalization).
feature
Feature detection (e.g. texture analysis, corners, etc.).
filter
Sharpening, edge finding, denoising, etc.
graph
Graph-theoretic operations, e.g. dynamic programming (shortest paths).
io
Reading, saving, and displaying images and video.
measure
Measurement of image properties, e.g., similarity and contours.
morphology
Morphological operations, e.g. opening or skeletonization.
segmentation
Splitting an image into self-similar regions.
transform
Geometric and other transforms, e.g. rotation or the Radon transform.
util
Generic utilities.

Utility Functions

get_log
Returns the skimage log. Use this to print debug output.
img_as_float
Convert an image to floating point format, with values in [0, 1].
img_as_uint
Convert an image to unsigned integer format, with values in [0, 65535].
img_as_int
Convert an image to signed integer format, with values in [-32768, 32767].
img_as_ubyte
Convert an image to unsigned byte format, with values in [0, 255].
skimage.get_log([name]) Return a console logger.
skimage.img_as_float(image[, force_copy]) Convert an image to double-precision floating point format.
skimage.img_as_int(image[, force_copy]) Convert an image to 16-bit signed integer format.
skimage.img_as_ubyte(image[, force_copy]) Convert an image to 8-bit unsigned integer format.
skimage.img_as_uint(image[, force_copy]) Convert an image to 16-bit unsigned integer format.

get_log

skimage.get_log(name=None)

Return a console logger.

Output may be sent to the logger using the debug, info, warning, error and critical methods.

Parameters :

name : str

Name of the log.

References

[R2]Logging facility for Python, http://docs.python.org/library/logging.html

img_as_float

skimage.img_as_float(image, force_copy=False)

Convert an image to double-precision floating point format.

Parameters :

image : ndarray

Input image.

force_copy : bool

Force a copy of the data, irrespective of its current dtype.

Returns :

out : ndarray of float64

Output image.

Notes

The range of a floating point image is [0, 1]. Negative input values will be shifted to the positive domain.

img_as_int

skimage.img_as_int(image, force_copy=False)

Convert an image to 16-bit signed integer format.

Parameters :

image : ndarray

Input image.

force_copy : bool

Force a copy of the data, irrespective of its current dtype.

Returns :

out : ndarray of uint16

Output image.

Notes

If the input data-type is positive-only (e.g., uint8), then the output image will still only have positive values.

img_as_ubyte

skimage.img_as_ubyte(image, force_copy=False)

Convert an image to 8-bit unsigned integer format.

Parameters :

image : ndarray

Input image.

force_copy : bool

Force a copy of the data, irrespective of its current dtype.

Returns :

out : ndarray of ubyte (uint8)

Output image.

Notes

If the input data-type is positive-only (e.g., uint16), then the output image will still only have positive values.

img_as_uint

skimage.img_as_uint(image, force_copy=False)

Convert an image to 16-bit unsigned integer format.

Parameters :

image : ndarray

Input image.

force_copy : bool

Force a copy of the data, irrespective of its current dtype.

Returns :

out : ndarray of uint16

Output image.

Notes

Negative input values will be shifted to the positive domain.