utility-functions

Utility Functions img_as_float Convert an image to floating point format, with values in [0, 1]. img_as_uint Convert an image to unsigned integer format, with values in [0, 65535]. img_as_int Convert an image to signed integer format, with values in [-32768, 32767]. img_as_ubyte Convert an image to unsigned byte format, with values in [0, 255]. skimage.dtype_limits(image[, clip_negative]) Return intensity limits, i.e. skimage.img_as_bool(image[, force_copy]) Convert an image to boolean form

canny

canny skimage.feature.canny(image, sigma=1.0, low_threshold=None, high_threshold=None, mask=None, use_quantiles=False) [source] Edge filter an image using the Canny algorithm. Parameters: image : 2D array Greyscale input image to detect edges on; can be of any dtype. sigma : float Standard deviation of the Gaussian filter. low_threshold : float Lower bound for hysteresis thresholding (linking edges). If None, low_threshold is set to 10% of dtype’s max. high_threshold : float Upper bo

compare-mse

compare_mse skimage.measure.compare_mse(im1, im2) [source] Compute the mean-squared error between two images. Parameters: im1, im2 : ndarray Image. Any dimensionality. Returns: mse : float The mean-squared error (MSE) metric.

warn

warn skimage.viewer.warn(message, category=None, stacklevel=2) [source] A version of warnings.warn with a default stacklevel of 2.

equalize-adapthist

equalize_adapthist skimage.exposure.equalize_adapthist(image, *args, **kwargs) [source] Contrast Limited Adaptive Histogram Equalization (CLAHE). An algorithm for local contrast enhancement, that uses histograms computed over different tile regions of the image. Local details can therefore be enhanced even in regions that are darker or lighter than most of the image. Parameters: image : array-like Input image. kernel_size: integer or 2-tuple Defines the shape of contextual regions used i

new-plot

new_plot skimage.viewer.utils.new_plot(parent=None, subplot_kw=None, **fig_kw) [source] Return new figure and axes. Parameters: parent : QtWidget Qt widget that displays the plot objects. If None, you must manually call canvas.setParent and pass the parent widget. subplot_kw : dict Keyword arguments passed matplotlib.figure.Figure.add_subplot. fig_kw : dict Keyword arguments passed matplotlib.figure.Figure.

pyramid-reduce

pyramid_reduce skimage.transform.pyramid_reduce(image, downscale=2, sigma=None, order=1, mode='reflect', cval=0) [source] Smooth and then downsample image. Parameters: image : array Input image. downscale : float, optional Downscale factor. sigma : float, optional Sigma for Gaussian filter. Default is 2 * downscale / 6.0 which corresponds to a filter mask twice the size of the scale factor that covers more than 99% of the Gaussian distribution. order : int, optional Order of splines

label

label skimage.morphology.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 [ ] [ ] [ ]

subtract-mean

subtract_mean skimage.filters.rank.subtract_mean(image, selem, out=None, mask=None, shift_x=False, shift_y=False) [source] Return image subtracted from its local mean. 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) If None, a new array is allocated. mask : ndarray Mask array that defines (>0) area of the image included in the local neighborhood. If None, th

structure-tensor-eigvals

structure_tensor_eigvals skimage.feature.structure_tensor_eigvals(Axx, Axy, Ayy) [source] Compute Eigen values of structure tensor. Parameters: Axx : ndarray Element of the structure tensor for each pixel in the input image. Axy : ndarray Element of the structure tensor for each pixel in the input image. Ayy : ndarray Element of the structure tensor for each pixel in the input image. Returns: l1 : ndarray Larger eigen value for each input matrix. l2 : ndarray Smaller eigen value