:orphan: .. _examples_gallery: 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 :ref:`user_guide` for a narrative introduction to key library conventions and basic image manipulation. .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. thumbnail-parent-div-close .. raw:: html </div> Data ---- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Most scikit-image functions are compatible with 3D datasets, i.e., images with 3 spatial dimensions (to be distinguished from 2D multichannel images, which are also arrays with three axes). skimage.data.cells3d returns a 3D fluorescence microscopy image of cells. The returned dataset is a 3D multichannel image with dimensions provided in (z, c, y, x) order. Channel 0 contains cell membranes, while channel 1 contains nuclei."> .. only:: html .. image:: /auto_examples/data/images/thumb/sphx_glr_plot_3d_thumb.png :alt: :ref:`sphx_glr_auto_examples_data_plot_3d.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Datasets with 3 or more spatial dimensions</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The title of each image indicates the name of the function."> .. only:: html .. image:: /auto_examples/data/images/thumb/sphx_glr_plot_scientific_thumb.png :alt: :ref:`sphx_glr_auto_examples_data_plot_scientific.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Scientific images</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The title of each image indicates the name of the function."> .. only:: html .. image:: /auto_examples/data/images/thumb/sphx_glr_plot_general_thumb.png :alt: :ref:`sphx_glr_auto_examples_data_plot_general.py` .. raw:: html <div class="sphx-glr-thumbnail-title">General-purpose images</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Specific images"> .. only:: html .. image:: /auto_examples/data/images/thumb/sphx_glr_plot_specific_thumb.png :alt: :ref:`sphx_glr_auto_examples_data_plot_specific.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Specific images</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Operations on NumPy arrays -------------------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This script illustrates how to use basic NumPy operations, such as slicing, masking and fancy indexing, in order to modify the pixel values of an image."> .. only:: html .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_camera_numpy_thumb.png :alt: :ref:`sphx_glr_auto_examples_numpy_operations_plot_camera_numpy.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Using simple NumPy operations for manipulating images</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use functions in :pyskimage.morphology to generate footprints (structuring elements) for use in morphology operations. The title of each plot indicates the call of the function."> .. only:: html .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_structuring_elements_thumb.png :alt: :ref:`sphx_glr_auto_examples_numpy_operations_plot_structuring_elements.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Generate footprints (structuring elements)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of view_as_blocks from :pyskimage.util. Block views can be incredibly useful when one wants to perform local operations on non-overlapping image patches."> .. only:: html .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_view_as_blocks_thumb.png :alt: :ref:`sphx_glr_auto_examples_numpy_operations_plot_view_as_blocks.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Block views on images/arrays</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Many footprints (structuring elements) can be decomposed into an equivalent series of smaller structuring elements. The term "flat" refers to footprints that only contain values of 0 or 1 (i.e., all methods in skimage.morphology.footprints). Binary dilation operations have an associative and distributive property that often allows decomposition into an equivalent series of smaller footprints. Most often this is done to provide a performance benefit."> .. only:: html .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_footprint_decompositions_thumb.png :alt: :ref:`sphx_glr_auto_examples_numpy_operations_plot_footprint_decompositions.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Decompose flat footprints (structuring elements)</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Manipulating exposure and color channels ---------------------------------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example converts an image with RGB channels into an image with a single grayscale channel."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_rgb_to_gray_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_rgb_to_gray.py` .. raw:: html <div class="sphx-glr-thumbnail-title">RGB to grayscale</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how RGB to HSV (Hue, Saturation, Value) conversion [1]_ can be used to facilitate segmentation processes."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_rgb_to_hsv_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_rgb_to_hsv.py` .. raw:: html <div class="sphx-glr-thumbnail-title">RGB to HSV</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the feature of histogram matching. It manipulates the pixels of an input image so that its histogram matches the histogram of the reference image. If the images have multiple channels, the matching is done independently for each channel, as long as the number of channels is equal in the input image and the reference."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_histogram_matching_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_histogram_matching.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Histogram matching</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="There are many filters that are designed to work with gray-scale images but not with color images. To simplify the process of creating functions that can adapt to RGB images, scikit-image provides the adapt_rgb decorator."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_adapt_rgb_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_adapt_rgb.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Adapting gray-scale filters to RGB images</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Here, we use morphological reconstruction to create a background image, which we can subtract from the original image to isolate bright features (regional maxima)."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_regional_maxima_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_regional_maxima.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Filtering regional maxima</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Color deconvolution consists in the separation of features by their colors."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_ihc_color_separation_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_ihc_color_separation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Separate colors in immunohistochemical staining</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example adjusts image contrast by performing a Gamma and a Logarithmic correction on the input image."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_log_gamma_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_log_gamma.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Gamma and log contrast adjustment</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This examples enhances an image with low contrast, using a method called histogram equalization, which "spreads out the most frequent intensity values" in an image [1]_. The equalized image has a roughly linear cumulative distribution function."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_equalize_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_equalize.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Histogram Equalization</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="It can be useful to artificially tint an image with some color, either to highlight particular regions of an image or maybe just to liven up a grayscale image. This example demonstrates image-tinting by scaling RGB values and by adjusting colors in the HSV color-space."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_tinting_grayscale_images_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_tinting_grayscale_images.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Tinting gray-scale images</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example enhances an image with low contrast, using a method called local histogram equalization, which spreads out the most frequent intensity values in an image."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_local_equalize_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_local_equalize.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Local Histogram Equalization</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Adaptive histogram equalization (AHE) can be used to improve the local contrast of an image [1]_. Specifically, AHE can be useful for normalizing intensities across images. This example compares the results of applying global histogram equalization and AHE to a 3D image and a synthetically degraded version of it."> .. only:: html .. image:: /auto_examples/color_exposure/images/thumb/sphx_glr_plot_adapt_hist_eq_3d_thumb.png :alt: :ref:`sphx_glr_auto_examples_color_exposure_plot_adapt_hist_eq_3d.py` .. raw:: html <div class="sphx-glr-thumbnail-title">3D adaptive histogram equalization</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Edges and lines --------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="We use a marching squares method to find constant valued contours in an image. In skimage.measure.find_contours, array values are linearly interpolated to provide better precision of the output contours. Contours which intersect the image edge are open; all others are closed."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_contours_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_contours.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Contour finding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The convex hull of a binary image is the set of pixels included in the smallest convex polygon that surround all white pixels in the input."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_convex_hull_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_convex_hull.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Convex Hull</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The Canny filter is a multi-stage edge detector. It uses a filter based on the derivative of a Gaussian in order to compute the intensity of the gradients.The Gaussian reduces the effect of noise present in the image. Then, potential edges are thinned down to 1-pixel curves by removing non-maximum pixels of the gradient magnitude. Finally, edge pixels are kept or removed using hysteresis thresholding on the gradient magnitude."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_canny_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_canny.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Canny edge detector</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Marching cubes is an algorithm to extract a 2D surface mesh from a 3D volume. This can be conceptualized as a 3D generalization of isolines on topographical or weather maps. It works by iterating across the volume, looking for regions which cross the level of interest. If such regions are found, triangulations are generated and added to an output mesh. The final result is a set of vertices and a set of triangular faces."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_marching_cubes_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_marching_cubes.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Marching Cubes</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The active contour model is a method to fit open or closed splines to lines or edges in an image [1]_. It works by minimising an energy that is in part defined by the image and part by the spline's shape: length and smoothness. The minimization is done implicitly in the shape energy and explicitly in the image energy."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_active_contours_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_active_contours.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Active Contour Model</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Ridge filters can be used to detect ridge-like structures, such as neurites [1]_, tubes [2]_, vessels [3]_, wrinkles [4]_ or rivers."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_ridge_filter_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_ridge_filter.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Ridge operators</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to draw several different shapes:"> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_shapes_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_shapes.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Shapes</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Example of generating random shapes with particular properties."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_random_shapes_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_random_shapes.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Random Shapes</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to approximate (Douglas-Peucker algorithm) and subdivide (B-Splines) polygonal chains."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_polygon_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_polygon.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Approximate and subdivide polygons</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The Hough transform in its simplest form is a method to detect straight lines [1]_."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_line_hough_transform_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_line_hough_transform.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Straight line Hough transform</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The Hough transform in its simplest form is a method to detect straight lines but it can also be used to detect circles or ellipses. The algorithm assumes that the edge is detected and it is robust against noise or missing points."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_circular_elliptical_hough_transform_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_circular_elliptical_hough_transform.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Circular and Elliptical Hough Transforms</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Skeletonization reduces binary objects to 1 pixel wide representations. This can be useful for feature extraction, and/or representing an object's topology."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_skeleton_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_skeleton.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Skeletonize</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Edge operators are used in image processing within edge detection algorithms. They are discrete differentiation operators, computing an approximation of the gradient of the image intensity function."> .. only:: html .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_edge_filter_thumb.png :alt: :ref:`sphx_glr_auto_examples_edges_plot_edge_filter.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Edge operators</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Geometrical transformations and registration -------------------------------------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Image swirling is a non-linear image deformation that creates a whirlpool effect. This example describes the implementation of this transform in skimage, as well as the underlying warp mechanism."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_swirl_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_swirl.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Swirl</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the different edge modes available during interpolation in routines such as :pyskimage.transform.rescale and :pyskimage.transform.resize."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_edge_modes_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_edge_modes.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Interpolation: Edge Modes</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Rescale operation resizes an image by a given scaling factor. The scaling factor can either be a single floating point value, or multiple values - one along each axis."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_rescale_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_rescale.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Rescale, resize, and downscale</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The pyramid_gaussian function takes an image and yields successive images shrunk by a constant scale factor. Image pyramids are often used, e.g., to implement algorithms for denoising, texture discrimination, and scale-invariant detection."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_pyramid_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_pyramid.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Build image pyramids</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use the Piecewise Affine Transformation."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_piecewise_affine_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_piecewise_affine.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Piecewise Affine Transformation</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will see how to use geometric transformations in the context of image processing."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_geometric_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_geometric.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Using geometric transformations</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="When comparing images, the mean squared error (MSE)--while simple to implement--is not highly indicative of perceived similarity. Structural similarity aims to address this shortcoming by taking texture into account [1]_, [2]_."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_ssim_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_ssim.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Structural similarity index</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Homographies are transformations of a Euclidean space that preserve the alignment of points. Specific cases of homographies correspond to the conservation of more properties, such as parallelism (affine transformation), shape (similar transformation) or distances (Euclidean transformation)."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_transform_types_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_transform_types.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Types of homographies</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="To warp an image, we start with a set of source and target coordinates. The goal is to deform the image such that the source points move to the target locations. Typically, we only know the target positions for a few, select source points. To calculate the target positions for all other pixel positions, we need a model. Various such models exist, such as affine or projective transformations."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_tps_deformation_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_tps_deformation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Use thin-plate splines for image warping</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to robustly estimate epipolar geometry <https://en.wikipedia.org/wiki/Epipolar_geometry> (the geometry of stereo vision) between two views using sparse ORB feature correspondences."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_fundamental_matrix_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_fundamental_matrix.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Fundamental matrix estimation</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example we see how to robustly fit a line model to faulty data using the RANSAC (random sample consensus) algorithm."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_ransac_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_ransac.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Robust line model estimation using RANSAC</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In computed tomography, the tomography reconstruction problem is to obtain a tomographic slice image from a set of projections [1]_. A projection is formed by drawing a set of parallel rays through the 2D object of interest, assigning the integral of the object's contrast along each ray to a single pixel in the projection. A single projection of a 2D object is one dimensional. To enable computed tomography reconstruction of the object, several projections must be acquired, each of them corresponding to a different angle between the rays with respect to the object. A collection of projections at several angles is called a sinogram, which is a linear transform of the original image."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_radon_transform_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_radon_transform.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Radon transform</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this simplified example we first generate two synthetic images as if they were taken from different view points."> .. only:: html .. image:: /auto_examples/transform/images/thumb/sphx_glr_plot_matching_thumb.png :alt: :ref:`sphx_glr_auto_examples_transform_plot_matching.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Robust matching using RANSAC</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Image registration ------------------ .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we use phase cross-correlation to identify the relative shift between two similar-sized images."> .. only:: html .. image:: /auto_examples/registration/images/thumb/sphx_glr_plot_register_translation_thumb.png :alt: :ref:`sphx_glr_auto_examples_registration_plot_register_translation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Image Registration</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we use the masked normalized cross-correlation to identify the relative shift between two similar images containing invalid data."> .. only:: html .. image:: /auto_examples/registration/images/thumb/sphx_glr_plot_masked_register_translation_thumb.png :alt: :ref:`sphx_glr_auto_examples_registration_plot_masked_register_translation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Masked Normalized Cross-Correlation</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Demonstration of image registration using optical flow."> .. only:: html .. image:: /auto_examples/registration/images/thumb/sphx_glr_plot_opticalflow_thumb.png :alt: :ref:`sphx_glr_auto_examples_registration_plot_opticalflow.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Registration using optical flow</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how a set of images can be assembled under the hypothesis of rigid body motions."> .. only:: html .. image:: /auto_examples/registration/images/thumb/sphx_glr_plot_stitching_thumb.png :alt: :ref:`sphx_glr_auto_examples_registration_plot_stitching.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Assemble images with simple image stitching</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Phase correlation (``registration.phase_cross_correlation``) is an efficient method for determining translation offset between pairs of similar images. However this approach relies on a near absence of rotation/scaling differences between the images, which are typical in real-world examples."> .. only:: html .. image:: /auto_examples/registration/images/thumb/sphx_glr_plot_register_rotation_thumb.png :alt: :ref:`sphx_glr_auto_examples_registration_plot_register_rotation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Using Polar and Log-Polar Transformations for Registration</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Filtering and restoration ------------------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to remove small objects from grayscale images. The top-hat transform [1]_ is an operation that extracts small elements and details from given images. Here we use a white top-hat transform, which is defined as the difference between the input image and its (mathematical morphology) opening."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_tophat_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_tophat.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Removing small objects in grayscale images with a top hat filter</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Hysteresis is the lagging of an effect---a kind of inertia. In the context of thresholding, it means that areas above some low threshold are considered to be above the threshold if they are also connected to areas above a higher, more stringent, threshold. They can thus be seen as continuations of these high-confidence areas."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_hysteresis_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_hysteresis.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Hysteresis thresholding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we deconvolve a noisy version of an image using Wiener and unsupervised Wiener algorithms. These algorithms are based on linear models that can't restore sharp edge as much as non-linear methods (like TV restoration) but are much faster."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_restoration_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_restoration.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Image Deconvolution</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Fast Fourier transforms (FFTs) assume that the data being transformed represent one period of a periodic signal. Thus the endpoints of the signal to be transformed can behave as discontinuities in the context of the FFT. These discontinuities distort the output of the FFT, resulting in energy from "real" frequency components leaking into wider frequencies."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_window_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_window.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Using window functions with images</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example compares the following mean filters of the rank filter package:"> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_rank_mean_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_rank_mean.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Mean filters</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Unsharp masking is a linear image processing technique which sharpens the image. The sharp details are identified as a difference between the original image and its blurred version. These details are then scaled, and added back to the original image:"> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_unsharp_mask_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_unsharp_mask.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Unsharp masking</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The algorithm is based on a PSF (Point Spread Function), where PSF is described as the impulse response of the optical system. The blurred image is sharpened through a number of iterations, which needs to be hand-tuned."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_deconvolution_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_deconvolution.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Image Deconvolution</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how the metric implemented in measure.blur_effect behaves, both as a function of the strength of blur and of the size of the re-blurring filter. This no-reference perceptual blur metric is described in [1]_."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_blur_effect_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_blur_effect.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Estimate strength of blur</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In information theory, information entropy is the log-base-2 of the number of possible outcomes for a message."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_entropy_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_entropy.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Entropy</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we show how to find an optimally calibrated version of any denoising algorithm."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_j_invariant_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_j_invariant.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Calibrating Denoisers Using J-Invariance</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Inpainting [1]_ is the process of reconstructing lost or deteriorated parts of images and videos."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_inpaint_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_inpaint.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Fill in defects with inpainting</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Band-pass filters attenuate signal frequencies outside of a range (band) of interest. In image analysis, they can be used to denoise images while at the same time reducing low-frequency artifacts such a uneven illumination. Band-pass filters can be used to find image features such as blobs and edges."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_dog_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_dog.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Band-pass filtering by Difference of Gaussians</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we denoise a noisy version of a picture using the total variation, bilateral, and wavelet denoising filters."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_denoise_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_denoise.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Denoising a picture</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The discrete wavelet transform is not `shift-invariant`_. Shift invariance can be achieved through an undecimated wavelet transform (also called stationary wavelet transform), at cost of increased redundancy (i.e. more wavelet coefficients than input image pixels). An alternative way to approximate shift-invariance in the context of image denoising with the discrete wavelet transform is to use the technique known as "cycle spinning". This involves averaging the results of the following 3-step procedure for multiple spatial shifts, n:"> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_cycle_spinning_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_cycle_spinning.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Shift-invariant wavelet denoising</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Some signals can only be observed modulo 2*pi, and this can also apply to two- and three dimensional images. In these cases phase unwrapping is needed to recover the underlying, unwrapped signal. In this example we will demonstrate an algorithm [1]_ implemented in skimage at work for such a problem. One-, two- and three dimensional images can all be unwrapped using skimage. Here we will demonstrate phase unwrapping in the two dimensional case."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_phase_unwrap_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_phase_unwrap.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Phase Unwrapping</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we denoise a detail of the astronaut image using the non-local means filter. The non-local means algorithm replaces the value of a pixel by an average of a selection of other pixels values: small patches centered on the other pixels are compared to the patch centered on the pixel of interest, and the average is performed only for pixels that have patches close to the current patch. As a result, this algorithm can restore well textures, that would be blurred by other denoising algorithm."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_nonlocal_means_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_nonlocal_means.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Non-local means denoising for preserving textures</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Attribute operators (or connected operators) [1]_ is a family of contour preserving filtering operations in mathematical morphology. They can be implemented by max-trees [2]_, a compact hierarchical representation of the image."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_attribute_operators_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_attribute_operators.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Attribute operators</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Wavelet denoising relies on the wavelet representation of the image. Gaussian noise tends to be represented by small values in the wavelet domain and can be removed by setting coefficients below a given threshold to zero (hard thresholding) or shrinking all coefficients toward zero by a given amount (soft thresholding)."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_denoise_wavelet_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_denoise_wavelet.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Wavelet denoising</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The Butterworth filter is implemented in the frequency domain and is designed to have no passband or stopband ripple. It can be used in either a lowpass or highpass variant. The cutoff_frequency_ratio parameter is used to set the cutoff frequency as a fraction of the sampling frequency. Given that the Nyquist frequency is half the sampling frequency, this means that this parameter should be a positive floating point value < 0.5. The order of the filter can be adjusted to control the transition width, with higher values leading to a sharper transition between the passband and stopband."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_butterworth_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_butterworth.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Butterworth Filters</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we show how to find an optimally calibrated version of any denoising algorithm."> .. only:: html .. image:: /auto_examples/filters/images/thumb/sphx_glr_plot_j_invariant_tutorial_thumb.png :alt: :ref:`sphx_glr_auto_examples_filters_plot_j_invariant_tutorial.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Full tutorial on calibrating Denoisers Using J-Invariance</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Detection of features and objects --------------------------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The DAISY local image descriptor is based on gradient orientation histograms similar to the SIFT descriptor. It is formulated in a way that allows for fast dense extraction which is useful for e.g. bag-of-features image representations."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_daisy_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_daisy.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Dense DAISY feature description</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The Histogram of Oriented Gradient (HOG) feature descriptor is popular for object detection [1]_."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_hog_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_hog.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Histogram of Oriented Gradients</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Haar-like features are simple digital image features that were introduced in a real-time face detector [1]_. These features can be efficiently computed on any scale in constant time, using an integral image [1]_. After that, a small number of critical features is selected from this large set of potential features (e.g., using AdaBoost learning algorithm as in [1]_). The following example will show the mechanism to build this family of descriptors."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_haar_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_haar.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Haar-like feature descriptor</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="We use template matching to identify the occurrence of an image patch (in this case, a sub-image centered on a single coin). Here, we return a single match (the exact same coin), so the maximum value in the match_template result corresponds to the coin location. The other coins look similar, and thus have local maxima; if you expect multiple matches, you should use a proper peak-finding function."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_template_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_template.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Template Matching</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Detect corner points using the Harris corner detector and determine the subpixel position of corners ([1]_, [2]_)."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_corner_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_corner.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Corner detection</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to compute multi-block local binary pattern (MB-LBP) features as well as how to visualize them."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_multiblock_local_binary_pattern_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_multiblock_local_binary_pattern.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Multi-Block Local Binary Pattern for texture classification</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="We fill holes (i.e. isolated, dark spots) in an image using morphological reconstruction by erosion. Erosion expands the minimal values of the seed image until it encounters a mask image. Thus, the seed image and mask image represent the maximum and minimum possible values of the reconstructed image."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_holes_and_peaks_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_holes_and_peaks.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Filling holes and finding peaks</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The CENSURE feature detector is a scale-invariant center-surround detector (CENSURE) that claims to outperform other detectors and is capable of real-time implementation."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_censure_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_censure.py` .. raw:: html <div class="sphx-glr-thumbnail-title">CENSURE feature detector</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="scikit-image has several ways of removing objects from N-dimensional images. Here, "objects" (and "holes") are defined as groups of samples with the same label value which distinct from the background and other objects."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_remove_objects_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_remove_objects.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Removing objects</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Blobs are bright on dark or dark on bright regions in an image. In this example, blobs are detected using 3 algorithms. The image used in this case is the Hubble eXtreme Deep Field. Each bright dot in the image is a star or a galaxy."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_blob_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_blob.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Blob Detection</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the ORB feature detection and binary description algorithm. It uses an oriented FAST detection method and the rotated BRIEF descriptors."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_orb_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_orb.py` .. raw:: html <div class="sphx-glr-thumbnail-title">ORB feature detector and binary descriptor</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="How to build a (bio-plausible) sparse dictionary (or 'codebook', or 'filterbank') for e.g. image classification without any fancy math and with just standard python scientific libraries?"> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_gabors_from_astronaut_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_gabors_from_astronaut.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Gabors / Primary Visual Cortex "Simple Cells" from an Image</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="A Fisher vector is an image feature encoding and quantization technique that can be seen as a soft or probabilistic version of the popular bag-of-visual-words or VLAD algorithms. Images are modelled using a visual vocabulary which is estimated using a K-mode Gaussian mixture model trained on low-level image features such as SIFT or ORB descriptors. The Fisher vector itself is a concatenation of the gradients of the Gaussian mixture model (GMM) with respect to its parameters - mixture weights, means, and covariance matrices."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_fisher_vector_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_fisher_vector.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Fisher vector feature encoding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the BRIEF binary description algorithm. The descriptor consists of relatively few bits and can be computed using a set of intensity difference tests. The short binary descriptor results in low memory footprint and very efficient matching based on the Hamming distance metric. BRIEF does not provide rotation-invariance. Scale-invariance can be achieved by detecting and extracting features at different scales."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_brief_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_brief.py` .. raw:: html <div class="sphx-glr-thumbnail-title">BRIEF binary descriptor</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the SIFT feature detection and its description algorithm."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_sift_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_sift.py` .. raw:: html <div class="sphx-glr-thumbnail-title">SIFT feature detector and descriptor extractor</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates texture classification using gray level co-occurrence matrices (GLCMs) [1]_. A GLCM is a histogram of co-occurring grayscale values at a given offset over an image."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_glcm_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_glcm.py` .. raw:: html <div class="sphx-glr-thumbnail-title">GLCM Texture Features</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The shape index is a single valued measure of local curvature, derived from the eigen values of the Hessian, defined by Koenderink & van Doorn [1]_."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_shape_index_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_shape_index.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Shape Index</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Histogram matching can be used for object detection in images [1]_. This example extracts a single coin from the skimage.data.coins image and uses histogram matching to attempt to locate it within the original image."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_windowed_histogram_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_windowed_histogram.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Sliding window histogram</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will see how to classify textures based on Gabor filter banks. Frequency and orientation representations of the Gabor filter are similar to those of the human visual system."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_gabor_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_gabor.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Gabor filter banks for texture classification</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will see how to classify textures based on LBP (Local Binary Pattern). LBP looks at points surrounding a central point and tests whether the surrounding points are greater than or less than the central point (i.e. gives a binary result)."> .. only:: html .. image:: /auto_examples/features_detection/images/thumb/sphx_glr_plot_local_binary_pattern_thumb.png :alt: :ref:`sphx_glr_auto_examples_features_detection_plot_local_binary_pattern.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Local Binary Pattern for texture classification</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Segmentation of objects ----------------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Construct a region boundary RAG with the rag_boundary function. The function :pyskimage.graph.rag_boundary takes an edge_map argument, which gives the significance of a feature (such as edges) being present at each pixel. In a region boundary RAG, the edge weight between two regions is the average value of the corresponding pixels in edge_map along their shared boundary."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_rag_boundary_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_rag_boundary.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Region Boundary based Region adjacency graphs (RAGs)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example constructs a Region Adjacency Graph (RAG) and merges regions which are similar in color. We construct a RAG and define edges as the difference in mean color. We then join regions with similar mean color."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_rag_mean_color_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_rag_mean_color.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Region adjacency graph (RAG) Thresholding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example constructs a Region Adjacency Graph (RAG) and recursively performs a Normalized Cut on it [1]_."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_ncut_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_ncut.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Normalized Cut</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The watershed transform is commonly used as a starting point for many segmentation algorithms. However, without a judicious choice of seeds, it can produce very uneven fragment sizes, which can be difficult to deal with in downstream analyses."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_compact_watershed_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_compact_watershed.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Find Regular Segments Using Compact Watershed</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Thresholding is used to create a binary image from a grayscale image [1]_."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_thresholding_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_thresholding.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Thresholding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example constructs a Region Adjacency Graph (RAG) and draws it with the rag_draw method."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_rag_draw_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_rag_draw.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Drawing Region Adjacency Graphs (RAGs)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The Chan-Vese segmentation algorithm is designed to segment objects without clearly defined boundaries. This algorithm is based on level sets that are evolved iteratively to minimize an energy, which is defined by weighted values corresponding to the sum of differences intensity from the average value outside the segmented region, the sum of differences from the average value inside the segmented region, and a term which is dependent on the length of the boundary of the segmented region."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_chan_vese_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_chan_vese.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Chan-Vese Segmentation</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The peak_local_max function returns the coordinates of local peaks (maxima) in an image. Internally, a maximum filter is used for finding local maxima. This operation dilates the original image and merges neighboring local maxima closer than the size of the dilation. Locations where the original image is equal to the dilated image are returned as local maxima."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_peak_local_max_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_peak_local_max.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Finding local maxima</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Niblack and Sauvola thresholds are local thresholding techniques that are useful for images where the background is not uniform, especially for text recognition [1]_, [2]_. Instead of calculating a single global threshold for the entire image, several thresholds are calculated for every pixel by using specific formulae that take into account the mean and standard deviation of the local neighborhood (defined by a window centered around the pixel)."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_niblack_sauvola_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_niblack_sauvola.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Niblack and Sauvola Thresholding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The multi-Otsu threshold [1]_ is a thresholding algorithm that is used to separate the pixels of an input image into several different classes, each one obtained according to the intensity of the gray levels within the image."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_multiotsu_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_multiotsu.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Multi-Otsu Thresholding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example is about comparing the segmentations obtained using the plain SLIC method [1]_ and its masked version maskSLIC [2]_."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_mask_slic_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_mask_slic.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Apply maskSLIC vs SLIC</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The random walker algorithm [1]_ determines the segmentation of an image from a set of markers labeling several phases (2 or more). An anisotropic diffusion equation is solved with tracers initiated at the markers' position. The local diffusivity coefficient is greater if neighboring pixels have similar values, so that diffusion is difficult across high gradients. The label of each unknown pixel is attributed to the label of the known marker that has the highest probability to be reached first during this diffusion process."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_random_walker_segmentation_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_random_walker_segmentation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Random walker segmentation</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Given several connected components represented by a label image, these connected components can be expanded into background regions using :pyskimage.segmentation.expand_labels. In contrast to :pyskimage.morphology.dilation this method will not let connected components expand into neighboring connected components with lower label number."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_expand_labels_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_expand_labels.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Expand segmentation labels without overlap</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The watershed is a classical algorithm used for segmentation, that is, for separating different objects in an image."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_watershed_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_watershed.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Watershed segmentation</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The watershed is a classical algorithm used for segmentation, that is, for separating different objects in an image."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_marked_watershed_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_marked_watershed.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Markers for watershed transform</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to segment an image with image labelling. The following steps are applied:"> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_label_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_label.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Label image regions</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example compares four popular low-level image segmentation methods. As it is difficult to obtain good segmentations, and the definition of "good" often depends on the application, these methods are usually used for obtaining an oversegmentation, also known as superpixels. These superpixels then serve as a basis for more sophisticated algorithms such as conditional random fields (CRF)."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_segmentations_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_segmentations.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Comparison of segmentation and superpixel algorithms</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="When segmenting an image, you may want to combine multiple alternative segmentations. The :pyskimage.segmentation.join_segmentations function computes the join of two segmentations, in which a pixel is placed in the same segment if and only if it is in the same segment in both segmentations."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_join_segmentations_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_join_segmentations.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Find the intersection of two segmentations</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates the use of the merge_nodes function of a Region Adjacency Graph (RAG). The RAG class represents an undirected weighted graph which inherits from networkx.Graph class. When a new node is formed by merging two nodes, the edge weight of all the edges incident on the resulting node can be updated by a user defined function weight_func."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_rag_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_rag.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Region Adjacency Graphs (RAGs)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example constructs a Region Adjacency Graph (RAG) and progressively merges regions that are similar in color. Merging two adjacent regions produces a new region with all the pixels from the merged regions. Regions are merged until no highly similar region pairs remain."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_rag_merge_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_rag_merge.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Region adjacency graph (RAG) Merging</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we show the error on measuring perimeters, comparing classic approximations and Crofton ones. For that, we estimate the perimeter of an object (either a square or a disk) and its rotated version, as we increase the rotation angle."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_perimeters_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_perimeters.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Measure perimeters with different estimators</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example demonstrates how to perform hierarchical merging on region boundary Region Adjacency Graphs (RAGs). Region boundary RAGs can be constructed with the :pyskimage.graph.rag_boundary function. The regions with the lowest edge weights are successively merged until there is no edge with weight less than thresh. The hierarchical merging is done through the :pyskimage.graph.merge_hierarchical function. For an example of how to construct region boundary based RAGs, see plot_rag_boundary."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_boundary_merge_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_boundary_merge.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Hierarchical Merging of Region Boundary RAGs</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="We detect local maxima in a galaxy image. The image is corrupted by noise, generating many local maxima. To keep only those maxima with sufficient local contrast, we use h-maxima."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_extrema_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_extrema.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Extrema</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This toy example shows how to compute the size of every labelled region in a series of 10 images. We use 2D images and then 3D images. The blob-like regions are generated synthetically. As the volume fraction (i.e., ratio of pixels or voxels covered by the blobs) increases, the number of blobs (regions) decreases, and the size (area or volume) of a single region can get larger and larger. The area (size) values are available in a pandas-compatible format, which makes for convenient data analysis and visualization."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_regionprops_table_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_regionprops_table.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Explore and visualize region properties with pandas</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to calculate the Hausdorff distance between two sets of points. The Hausdorff distance is the maximum distance between any point on the first set and its nearest point on the second set, and vice-versa."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_hausdorff_distance_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_hausdorff_distance.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Hausdorff Distance</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Morphological Snakes [1]_ are a family of methods for image segmentation. Their behavior is similar to that of active contours (for example, Geodesic Active Contours [2]_ or Active Contours without Edges [3]_). However, Morphological Snakes use morphological operators (such as dilation or erosion) over a binary array instead of solving PDEs over a floating point array, which is the standard approach for active contours. This makes Morphological Snakes faster and numerically more stable than their traditional counterpart."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_morphsnakes_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_morphsnakes.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Morphological Snakes</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="A pixel-based segmentation is computed here using local features based on local intensity, edges and textures at different scales. A user-provided mask is used to identify different regions. The pixels of the mask are used to train a random-forest classifier [1]_ from scikit-learn. Unlabeled pixels are then labeled from the prediction of the classifier."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_trainable_segmentation_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_trainable_segmentation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Trainable segmentation using local features and random forests</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to measure properties of labelled image regions. We first analyze an image with two ellipses. Below we show how to explore interactively the properties of labelled objects."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_regionprops_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_regionprops.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Measure region properties</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Flood fill is an algorithm to identify and/or change adjacent values in an image based on their similarity to an initial seed point [1]_. The conceptual analogy is the 'paint bucket' tool in many graphic editors."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_floodfill_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_floodfill.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Flood Fill</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="When trying out different segmentation methods, how do you know which one is best? If you have a ground truth or gold standard segmentation, you can use various metrics to check how close each automated method comes to the truth. In this example we use an easy-to-segment image as an example of how to interpret various segmentation metrics. We will use the adapted Rand error and the variation of information as example metrics, and see how oversegmentation (splitting of true segments into too many sub-segments) and undersegmentation (merging of different true segments into a single segment) affect the different scores."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_metrics_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_metrics.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Evaluating segmentation metrics</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example shows an illustration of the computation of the Euler number [1]_ in 2D and 3D objects."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_euler_number_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_euler_number.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Euler number</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The rolling-ball algorithm estimates the background intensity of a grayscale image in case of uneven exposure. It is frequently used in biomedical image processing and was first proposed by Stanley R. Sternberg in 1983 [1]_."> .. only:: html .. image:: /auto_examples/segmentation/images/thumb/sphx_glr_plot_rolling_ball_thumb.png :alt: :ref:`sphx_glr_auto_examples_segmentation_plot_rolling_ball.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Use rolling-ball algorithm for estimating background intensity</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> Longer examples and demonstrations ---------------------------------- .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Scikit-image currently doesn't feature a function that allows you to write text onto an image. However, there is a fairly easy workaround using scikit-image's optional dependency matplotlib."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_text_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_text.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Render text onto an image</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This computer vision example shows how to detect faces on an image using object detection framework based on machine learning."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_face_detection_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_face_detection.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Face detection using a cascade classifier</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this tutorial, we explore interactively a biomedical image which has three spatial dimensions and three color dimensions (channels). For a general introduction to 3D image processing, please refer to sphx_glr_auto_examples_applications_plot_3d_image_processing.py. The data we use here correspond to kidney tissue which was imaged with confocal fluorescence microscopy (more details at [1]_ under kidney-tissue-fluorescence.tif)."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_3d_interaction_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_3d_interaction.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Interact with 3D images (of kidney tissue)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In various image analysis situations, it is useful to think of the pixels of an image, or of a region of an image, as a network or graph, in which each pixel is connected to its neighbors (with or without diagonals). One such situation is finding the geodesic center of an object, which is the point closest to all other points if you are only allowed to travel on the pixels of the object, rather than in a straight line. This point is the one with maximal closeness centrality [1]_ in the network."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_pixel_graphs_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_pixel_graphs.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Use pixel graphs to find an object's geodesic center</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Image comparison is particularly useful when performing image processing tasks such as exposure manipulations, filtering, and restoration."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_image_comparison_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_image_comparison.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Visual image comparison</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Morphological image processing is a collection of non-linear operations related to the shape or morphology of features in an image, such as boundaries, skeletons, etc. In any given technique, we probe an image with a small shape or template called a structuring element, which defines the region of interest or neighborhood around a pixel."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_morphology_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_morphology.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Morphological Filtering</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we will see how to segment objects from a background. We use the coins image from skimage.data, which shows several coins outlined against a darker background."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_coins_segmentation_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_coins_segmentation.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Comparing edge-based and region-based segmentation</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this tutorial, we compute the structure tensor of a 3D image. For a general introduction to 3D image processing, please refer to sphx_glr_auto_examples_applications_plot_3d_image_processing.py. The data we use here are sampled from an image of kidney tissue obtained by confocal fluorescence microscopy (more details at [1]_ under kidney-tissue-fluorescence.tif)."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_3d_structure_tensor_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_3d_structure_tensor.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Estimate anisotropy in a 3D microscopy image</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we demonstrate the use of different metrics to assess the colocalization of two different image channels."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_colocalization_metrics_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_colocalization_metrics.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Colocalization metrics</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we analyze a microscopy image of human cells. We use data provided by Jason Moffat [1]_ through CellProfiler."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_human_mitosis_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_human_mitosis.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Segment human cells (in mitosis)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Thresholding is used to create a binary image from a grayscale image [1]_. It is the simplest way to segment objects from a background."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_thresholding_guide_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_thresholding_guide.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Thresholding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Optical coherence tomography (OCT) is a non-invasive imaging technique used by ophthalmologists to take pictures of the back of a patient's eye [1]_. When performing OCT, dust may stick to the reference mirror of the equipment, causing dark spots to appear on the images. The problem is that these dirt spots cover areas of in-vivo tissue, hence hiding data of interest. Our goal here is to restore (reconstruct) the hidden areas based on the pixels near their boundaries."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_cornea_spot_inpainting_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_cornea_spot_inpainting.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Restore spotted cornea image with inpainting</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In this example, we identify and track the solid-liquid (S-L) interface in a nickel-based alloy undergoing solidification. Tracking the solidification over time enables the calculation of the solidification velocity. This is important to characterize the solidified structure of the sample and will be used to inform research into additive manufacturing of metals. The image sequence was obtained by the Center for Advanced Non-Ferrous Structural Alloys (CANFSA) using synchrotron x-radiography at the Advanced Photon Source (APS) at Argonne National Laboratory (ANL). This analysis was first presented at a conference [1]_."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_solidification_tracking_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_solidification_tracking.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Track solidification of a metallic alloy</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Haar-like feature descriptors were successfully used to implement the first real-time face detector [1]_. Inspired by this application, we propose an example illustrating the extraction, selection, and classification of Haar-like features to detect faces vs. non-faces."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_haar_extraction_selection_classification_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_haar_extraction_selection_classification.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Face classification using Haar-like feature descriptor</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This example reproduces a well-established workflow in bioimage data analysis for measuring the fluorescence intensity localized to the nuclear envelope, in a time sequence of cell images (each with two channels and two spatial dimensions) which shows a process of protein re-localization from the cytoplasmic area to the nuclear envelope. This biological application was first presented by Andrea Boni and collaborators in [1]_; it was used in a textbook by Kota Miura [2]_ as well as in other works ([3]_, [4]_). In other words, we port this workflow from ImageJ Macro to Python with scikit-image."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_fluorescence_nuclear_envelope_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_fluorescence_nuclear_envelope.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Measure fluorescence intensity at the nuclear envelope</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="This tutorial is an introduction to three-dimensional image processing. For a quick intro to 3D datasets, please refer to sphx_glr_auto_examples_data_plot_3d.py. Images are represented as numpy arrays. A single-channel, or grayscale, image is a 2D matrix of pixel intensities of shape (n_row, n_col), where n_row (resp. n_col) denotes the number of rows (resp. columns). We can construct a 3D volume as a series of 2D planes, giving 3D images the shape (n_plane, n_row, n_col), where n_plane is the number of planes. A multichannel, or RGB(A), image has an additional channel dimension in the final position containing color information."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_3d_image_processing_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_3d_image_processing.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Explore 3D images (of cells)</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="Rank filters are non-linear filters using local gray-level ordering to compute the filtered value. This ensemble of filters share a common base: the local gray-level histogram is computed on the neighborhood of a pixel (defined by a 2D structuring element). If the filtered value is taken as the middle value of the histogram, we get the classical median filter."> .. only:: html .. image:: /auto_examples/applications/images/thumb/sphx_glr_plot_rank_filters_thumb.png :alt: :ref:`sphx_glr_auto_examples_applications_plot_rank_filters.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Rank filters</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> 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. .. raw:: html <div class="sphx-glr-thumbnails"> .. thumbnail-parent-div-open .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="In 1993, Li and Lee proposed a new criterion for finding the "optimal" threshold to distinguish between the background and foreground of an image [1]_. They proposed that minimizing the cross-entropy between the foreground and the foreground mean, and the background and the background mean, would give the best threshold in most situations."> .. only:: html .. image:: /auto_examples/developers/images/thumb/sphx_glr_plot_threshold_li_thumb.png :alt: :ref:`sphx_glr_auto_examples_developers_plot_threshold_li.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Li thresholding</div> </div> .. raw:: html <div class="sphx-glr-thumbcontainer" tooltip="The max-tree is a hierarchical representation of an image that is the basis for a large family of morphological filters."> .. only:: html .. image:: /auto_examples/developers/images/thumb/sphx_glr_plot_max_tree_thumb.png :alt: :ref:`sphx_glr_auto_examples_developers_plot_max_tree.py` .. raw:: html <div class="sphx-glr-thumbnail-title">Max-tree</div> </div> .. thumbnail-parent-div-close .. raw:: html </div> .. toctree:: :hidden: :includehidden: /auto_examples/data/index.rst /auto_examples/numpy_operations/index.rst /auto_examples/color_exposure/index.rst /auto_examples/edges/index.rst /auto_examples/transform/index.rst /auto_examples/registration/index.rst /auto_examples/filters/index.rst /auto_examples/features_detection/index.rst /auto_examples/segmentation/index.rst /auto_examples/applications/index.rst /auto_examples/developers/index.rst .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-gallery .. container:: sphx-glr-download sphx-glr-download-python :download:`Download all examples in Python source code: auto_examples_python.zip </auto_examples/auto_examples_python.zip>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip </auto_examples/auto_examples_jupyter.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_