module-skimage.viewer.canvastools

Module: viewer.canvastools skimage.viewer.canvastools.LineTool(manager) Widget for line selection in a plot. skimage.viewer.canvastools.PaintTool(...[, ...]) Widget for painting on top of a plot. skimage.viewer.canvastools.RectangleTool(manager) Widget for selecting a rectangular region in a plot. skimage.viewer.canvastools.ThickLineTool(manager) Widget for line selection in a plot.

hsobel

hsobel skimage.filters.hsobel(*args, **kwargs) [source] Deprecated function. Use skimage.filters.sobel_h instead. Find the horizontal edges of an image using the Sobel 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 absolute Sobel edge map. N

rgb2gray

rgb2gray skimage.color.rgb2gray(rgb) [source] Compute luminance of an RGB image. Parameters: rgb : array_like The image in RGB format, in a 3-D array of shape (.., .., 3), or in RGBA format with shape (.., .., 4). Returns: out : ndarray The luminance image, a 2-D array. Raises: ValueError If rgb2gray is not a 3-D array of shape (.., .., 3) or (.., .., 4). Notes The weights used in this conversion are calibrated for contemporary CRT phosphors: Y = 0.2125 R + 0.7154 G + 0.0721 B I

load-surf

load_surf skimage.io.load_surf(f) [source] Read SIFT or SURF features from a file. Parameters: f : string or open file Input file generated by the feature detectors from http://people.cs.ubc.ca/~lowe/keypoints/ or http://www.vision.ee.ethz.ch/~surf/ Returns: data : record array with fields row: int row position of feature column: int column position of feature scale: float feature scale orientation: float feature orientation data: array feature values

moments

moments skimage.measure.moments(image, order=3) [source] Calculate all raw image moments up to a certain order. The following properties can be calculated from raw image moments: Area as: m[0, 0]. Centroid as: {m[0, 1] / m[0, 0], m[1, 0] / m[0, 0]}. Note that raw moments are neither translation, scale nor rotation invariant. Parameters: image : 2D double or uint8 array Rasterized shape as image. order : int, optional Maximum order of moments. Default is 3. Returns: m : (order + 1, o

relabel-sequential

relabel_sequential skimage.segmentation.relabel_sequential(label_field, offset=1) [source] Relabel arbitrary labels to {offset, ... offset + number_of_labels}. This function also returns the forward map (mapping the original labels to the reduced labels) and the inverse map (mapping the reduced labels back to the original ones). Parameters: label_field : numpy array of int, arbitrary shape An array of labels. offset : int, optional The return labels will start at offset, which should be

guess-spatial-dimensions

guess_spatial_dimensions skimage.color.guess_spatial_dimensions(image) [source] Make an educated guess about whether an image has a channels dimension. Parameters: image : ndarray The input image. Returns: spatial_dims : int or None The number of spatial dimensions of image. If ambiguous, the value is None. Raises: ValueError If the image array has less than two or more than four dimensions.

profile-line

profile_line skimage.measure.profile_line(img, src, dst, linewidth=1, order=1, mode='constant', cval=0.0) [source] Return the intensity profile of an image measured along a scan line. Parameters: img : numeric array, shape (M, N[, C]) The image, either grayscale (2D array) or multichannel (3D array, where the final axis contains the channel information). src : 2-tuple of numeric scalar (float or int) The start point of the scan line. dst : 2-tuple of numeric scalar (float or int) The e

percentile

percentile skimage.filters.rank.percentile(image, selem, out=None, mask=None, shift_x=False, shift_y=False, p0=0) [source] Return local percentile of an image. Returns the value of the p0 lower percentile of the local greyvalue distribution. Only greyvalues between percentiles [p0, p1] are considered in the filter. Parameters: image : 2-D array (uint8, uint16) Input image. selem : 2-D array The neighborhood expressed as a 2-D array of 1’s and 0’s. out : 2-D array (same dtype as input)

label

label skimage.measure.label(input, neighbors=None, background=None, return_num=False, connectivity=None) [source] Label connected regions of an integer array. Two pixels are connected when they are neighbors and have the same value. In 2D, they can be neighbors either in a 1- or 2-connected sense. The value refers to the maximum number of orthogonal hops to consider a pixel/voxel a neighbor: 1-connectivity 2-connectivity diagonal connection close-up [ ] [ ] [ ] [ ]