skeletonize

skeletonize skimage.morphology.skeletonize(image) [source] Return the skeleton of a binary image. Thinning is used to reduce each connected component in a binary image to a single-pixel wide skeleton. Parameters: image : numpy.ndarray A binary image containing the objects to be skeletonized. ‘1’ represents foreground, and ‘0’ represents background. It also accepts arrays of boolean values where True is foreground. Returns: skeleton : ndarray A matrix containing the thinned image. Se

skeletonize-3d

skeletonize_3d skimage.morphology.skeletonize_3d(img) [source] Compute the skeleton of a binary image. Thinning is used to reduce each connected component in a binary image to a single-pixel wide skeleton. Parameters: img : ndarray, 2D or 3D A binary image containing the objects to be skeletonized. Zeros represent background, nonzero values are foreground. Returns: skeleton : ndarray The thinned image. See also skeletonize, medial_axis Notes The method of [Lee94] uses an octree dat

similaritytransform

SimilarityTransform class skimage.transform.SimilarityTransform(matrix=None, scale=None, rotation=None, translation=None) [source] Bases: skimage.transform._geometric.ProjectiveTransform 2D similarity transformation of the form: ..:math: X = a0 * x - b0 * y + a1 = = m * x * cos(rotation) - m * y * sin(rotation) + a1 Y = b0 * x + a0 * y + b1 = = m * x * sin(rotation) + m * y * cos(rotation) + b1 where m is a zoom factor and the homogeneous transformation matrix is: [[a0 b0 a1] [b0 a0 b1

show

show skimage.io.show() [source] Display pending images. Launch the event loop of the current gui plugin, and display all pending images, queued via imshow. This is required when using imshow from non-interactive scripts. A call to show will block execution of code until all windows have been closed. Examples >>> import skimage.io as io >>> for i in range(4): ... ax_im = io.imshow(np.random.rand(50, 50)) >>> io.show()

shortest-path

shortest_path skimage.graph.shortest_path(arr, reach=1, axis=-1, output_indexlist=False) [source] Find the shortest path through an n-d array from one side to another. Parameters: arr : ndarray of float64 reach : int, optional By default (reach = 1), the shortest path can only move one row up or down for every step it moves forward (i.e., the path gradient is limited to 1). reach defines the number of elements that can be skipped along each non-axis dimension at each step. axis : int, opt

set-color

set_color skimage.draw.set_color(img, coords, color, alpha=1) [source] Set pixel color in the image at the given coordinates. Coordinates that exceed the shape of the image will be ignored. Parameters: img : (M, N, D) ndarray Image coords : tuple of ((P,) ndarray, (P,) ndarray) Row and column coordinates of pixels to be colored. color : (D,) ndarray Color to be assigned to coordinates in the image. alpha : scalar or (N,) ndarray Alpha values used to blend color with image. 0 is trans

separate-stains

separate_stains skimage.color.separate_stains(rgb, conv_matrix) [source] RGB to stain color space conversion. Parameters: rgb : array_like The image in RGB format, in a 3-D array of shape (.., .., 3). conv_matrix: ndarray The stain separation matrix as described by G. Landini [R55]. Returns: out : ndarray The image in stain color space, in a 3-D array of shape (.., .., 3). Raises: ValueError If rgb is not a 3-D array of shape (.., .., 3). Notes Stain separation matrices availab

seam-carve

seam_carve skimage.transform.seam_carve(img, energy_map, mode, num, border=1, force_copy=True) [source] Carve vertical or horizontal seams off an image. Carves out vertical/horizontal seams from an image while using the given energy map to decide the importance of each pixel. Parameters: image : (M, N) or (M, N, 3) ndarray Input image whose seams are to be removed. energy_map : (M, N) ndarray The array to decide the importance of each pixel. The higher the value corresponding to a pixel,

scharr-v

scharr_v skimage.filters.scharr_v(image, mask=None) [source] Find the vertical edges of an image using the Scharr transform. Parameters: image : 2-D array Image to process mask : 2-D array, optional An optional mask to limit the application to a certain area. Note that pixels surrounding masked regions are also masked to prevent masked regions from affecting the result. Returns: output : 2-D array The Scharr edge map. Notes We use the following kernel: 3 0 -3 10 0 -10 3

scharr

scharr skimage.filters.scharr(image, mask=None) [source] Find the edge magnitude using the Scharr transform. Parameters: image : 2-D array Image to process. mask : 2-D array, optional An optional mask to limit the application to a certain area. Note that pixels surrounding masked regions are also masked to prevent masked regions from affecting the result. Returns: output : 2-D array The Scharr edge map. See also sobel, prewitt, canny Notes Take the square root of the sum of the s