Examples#

A gallery of examples and that showcase how scikit-image can be used. Some examples demonstrate the use of the API in general and some demonstrate specific applications in tutorial form.

Hint

Check out our User guide for a narrative introduction to key library conventions and basic image manipulation.

Data#

Datasets with 3 or more spatial dimensions

Datasets with 3 or more spatial dimensions

Scientific images

Scientific images

General-purpose images

General-purpose images

Specific images

Specific images

Operations on NumPy arrays#

Using simple NumPy operations for manipulating images

Using simple NumPy operations for manipulating images

Generate footprints (structuring elements)

Generate footprints (structuring elements)

Block views on images/arrays

Block views on images/arrays

Decompose flat footprints (structuring elements)

Decompose flat footprints (structuring elements)

Manipulating exposure and color channels#

RGB to grayscale

RGB to grayscale

RGB to HSV

RGB to HSV

Histogram matching

Histogram matching

Adapting gray-scale filters to RGB images

Adapting gray-scale filters to RGB images

Separate colors in immunohistochemical staining

Separate colors in immunohistochemical staining

Filtering regional maxima

Filtering regional maxima

Gamma and log contrast adjustment

Gamma and log contrast adjustment

Histogram Equalization

Histogram Equalization

Tinting gray-scale images

Tinting gray-scale images

Local Histogram Equalization

Local Histogram Equalization

3D adaptive histogram equalization

3D adaptive histogram equalization

Edges and lines#

Contour finding

Contour finding

Convex Hull

Convex Hull

Canny edge detector

Canny edge detector

Marching Cubes

Marching Cubes

Ridge operators

Ridge operators

Active Contour Model

Active Contour Model

Shapes

Shapes

Random Shapes

Random Shapes

Approximate and subdivide polygons

Approximate and subdivide polygons

Straight line Hough transform

Straight line Hough transform

Circular and Elliptical Hough Transforms

Circular and Elliptical Hough Transforms

Skeletonize

Skeletonize

Edge operators

Edge operators

Geometrical transformations and registration#

Swirl

Swirl

Interpolation: Edge Modes

Interpolation: Edge Modes

Rescale, resize, and downscale

Rescale, resize, and downscale

Build image pyramids

Build image pyramids

Piecewise Affine Transformation

Piecewise Affine Transformation

Using geometric transformations

Using geometric transformations

Structural similarity index

Structural similarity index

Types of homographies

Types of homographies

Fundamental matrix estimation

Fundamental matrix estimation

Robust line model estimation using RANSAC

Robust line model estimation using RANSAC

Radon transform

Radon transform

Robust matching using RANSAC

Robust matching using RANSAC

Image registration#

Image Registration

Image Registration

Masked Normalized Cross-Correlation

Masked Normalized Cross-Correlation

Registration using optical flow

Registration using optical flow

Assemble images with simple image stitching

Assemble images with simple image stitching

Using Polar and Log-Polar Transformations for Registration

Using Polar and Log-Polar Transformations for Registration

Filtering and restoration#

Removing small objects in grayscale images with a top hat filter

Removing small objects in grayscale images with a top hat filter

Hysteresis thresholding

Hysteresis thresholding

Image Deconvolution

Image Deconvolution

Using window functions with images

Using window functions with images

Unsharp masking

Unsharp masking

Mean filters

Mean filters

Image Deconvolution

Image Deconvolution

Estimate strength of blur

Estimate strength of blur

Entropy

Entropy

Calibrating Denoisers Using J-Invariance

Calibrating Denoisers Using J-Invariance

Inpainting

Inpainting

Band-pass filtering by Difference of Gaussians

Band-pass filtering by Difference of Gaussians

Denoising a picture

Denoising a picture

Shift-invariant wavelet denoising

Shift-invariant wavelet denoising

Phase Unwrapping

Phase Unwrapping

Non-local means denoising for preserving textures

Non-local means denoising for preserving textures

Attribute operators

Attribute operators

Wavelet denoising

Wavelet denoising

Butterworth Filters

Butterworth Filters

Full tutorial on calibrating Denoisers Using J-Invariance

Full tutorial on calibrating Denoisers Using J-Invariance

Detection of features and objects#

Dense DAISY feature description

Dense DAISY feature description

Histogram of Oriented Gradients

Histogram of Oriented Gradients

Template Matching

Template Matching

Filling holes and finding peaks

Filling holes and finding peaks

CENSURE feature detector

CENSURE feature detector

Corner detection

Corner detection

Multi-Block Local Binary Pattern for texture classification

Multi-Block Local Binary Pattern for texture classification

Haar-like feature descriptor

Haar-like feature descriptor

Blob Detection

Blob Detection

ORB feature detector and binary descriptor

ORB feature detector and binary descriptor

Gabors / Primary Visual Cortex “Simple Cells” from an Image

Gabors / Primary Visual Cortex "Simple Cells" from an Image

Fisher vector feature encoding

Fisher vector feature encoding

BRIEF binary descriptor

BRIEF binary descriptor

SIFT feature detector and descriptor extractor

SIFT feature detector and descriptor extractor

GLCM Texture Features

GLCM Texture Features

Shape Index

Shape Index

Sliding window histogram

Sliding window histogram

Gabor filter banks for texture classification

Gabor filter banks for texture classification

Local Binary Pattern for texture classification

Local Binary Pattern for texture classification

Segmentation of objects#

Region Boundary based RAGs

Region Boundary based RAGs

RAG Thresholding

RAG Thresholding

Normalized Cut

Normalized Cut

Find Regular Segments Using Compact Watershed

Find Regular Segments Using Compact Watershed

Thresholding

Thresholding

Drawing Region Adjacency Graphs (RAGs)

Drawing Region Adjacency Graphs (RAGs)

Chan-Vese Segmentation

Chan-Vese Segmentation

Finding local maxima

Finding local maxima

Niblack and Sauvola Thresholding

Niblack and Sauvola Thresholding

Multi-Otsu Thresholding

Multi-Otsu Thresholding

Apply maskSLIC vs SLIC

Apply maskSLIC vs SLIC

Random walker segmentation

Random walker segmentation

Expand segmentation labels without overlap

Expand segmentation labels without overlap

Watershed segmentation

Watershed segmentation

Label image regions

Label image regions

Markers for watershed transform

Markers for watershed transform

Comparison of segmentation and superpixel algorithms

Comparison of segmentation and superpixel algorithms

Find the intersection of two segmentations

Find the intersection of two segmentations

Region Adjacency Graphs

Region Adjacency Graphs

Measure perimeters with different estimators

Measure perimeters with different estimators

RAG Merging

RAG Merging

Hierarchical Merging of Region Boundary RAGs

Hierarchical Merging of Region Boundary RAGs

Extrema

Extrema

Explore and visualize region properties with pandas

Explore and visualize region properties with pandas

Hausdorff Distance

Hausdorff Distance

Measure region properties

Measure region properties

Trainable segmentation using local features and random forests

Trainable segmentation using local features and random forests

Morphological Snakes

Morphological Snakes

Flood Fill

Flood Fill

Euler number

Euler number

Evaluating segmentation metrics

Evaluating segmentation metrics

Use rolling-ball algorithm for estimating background intensity

Use rolling-ball algorithm for estimating background intensity

Longer examples and demonstrations#

Render text onto an image

Render text onto an image

Face detection using a cascade classifier

Face detection using a cascade classifier

Interact with 3D images (of kidney tissue)

Interact with 3D images (of kidney tissue)

Use pixel graphs to find an object’s geodesic center

Use pixel graphs to find an object's geodesic center

Visual image comparison

Visual image comparison

Morphological Filtering

Morphological Filtering

Estimate anisotropy in a 3D microscopy image

Estimate anisotropy in a 3D microscopy image

Comparing edge-based and region-based segmentation

Comparing edge-based and region-based segmentation

Colocalization metrics

Colocalization metrics

Segment human cells (in mitosis)

Segment human cells (in mitosis)

Thresholding

Thresholding

Track solidification of a metallic alloy

Track solidification of a metallic alloy

Measure fluorescence intensity at the nuclear envelope

Measure fluorescence intensity at the nuclear envelope

Face classification using Haar-like feature descriptor

Face classification using Haar-like feature descriptor

Explore 3D images (of cells)

Explore 3D images (of cells)

Rank filters

Rank filters

Examples for developers#

In this folder, we have examples for advanced topics, including detailed explanations of the inner workings of certain algorithms.

These examples require some basic knowledge of image processing. They are targeted at existing or would-be scikit-image developers wishing to develop their knowledge of image processing algorithms.

Li thresholding

Li thresholding

Max-tree

Max-tree

Gallery generated by Sphinx-Gallery