ellipse

ellipse skimage.draw.ellipse(r, c, yradius, xradius, shape=None) [source] Generate coordinates of pixels within ellipse. Parameters: r, c : double Centre coordinate of ellipse. yradius, xradius : double Minor and major semi-axes. (x/xradius)**2 + (y/yradius)**2 = 1. shape : tuple, optional Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for ellipses which exceed the image size. By default the full extent of the ellipse are used. R

img-as-ubyte

img_as_ubyte skimage.img_as_ubyte(image, force_copy=False) [source] Convert an image to 8-bit unsigned integer format. Parameters: image : ndarray Input image. force_copy : bool Force a copy of the data, irrespective of its current dtype. Returns: out : ndarray of ubyte (uint8) Output image. Notes Negative input values will be clipped. Positive values are scaled between 0 and 255.

Getting help on using skimage

Getting help on using skimage Besides the user guide, there exist other opportunities to get help on using skimage.

rag-boundary

rag_boundary skimage.future.graph.rag_boundary(labels, edge_map, connectivity=2) [source] Comouter RAG based on region boundaries Given an image’s initial segmentation and its edge map this method constructs the corresponding Region Adjacency Graph (RAG). Each node in the RAG represents a set of pixels within the image with the same label in labels. The weight between two adjacent regions is the average value in edge_map along their boundary. labels : ndarray The labelled image. edge_map

octagon

octagon skimage.morphology.octagon(m, n, dtype=) [source] Generates an octagon shaped structuring element. For a given size of (m) horizontal and vertical sides and a given (n) height or width of slanted sides octagon is generated. The slanted sides are 45 or 135 degrees to the horizontal axis and hence the widths and heights are equal. Parameters: m : int The size of the horizontal and vertical sides. n : int The height or width of the slanted sides. Returns: selem : ndarray The str

pyramid-expand

pyramid_expand skimage.transform.pyramid_expand(image, upscale=2, sigma=None, order=1, mode='reflect', cval=0) [source] Upsample and then smooth image. Parameters: image : array Input image. upscale : float, optional Upscale factor. sigma : float, optional Sigma for Gaussian filter. Default is 2 * upscale / 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 used in in

circlemodel

CircleModel class skimage.measure.CircleModel [source] Bases: skimage.measure.fit.BaseModel Total least squares estimator for 2D circles. The functional model of the circle is: r**2 = (x - xc)**2 + (y - yc)**2 This estimator minimizes the squared distances from all points to the circle: min{ sum((r - sqrt((x_i - xc)**2 + (y_i - yc)**2))**2) } A minimum number of 3 points is required to solve for the parameters. Attributes params (tuple) Circle model parameters in the following order xc, yc

modal

modal skimage.filters.rank.modal(image, selem, out=None, mask=None, shift_x=False, shift_y=False) [source] Return local mode of an image. The mode is the value that appears most often in the local histogram. 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 include

approximate-polygon

approximate_polygon skimage.measure.approximate_polygon(coords, tolerance) [source] Approximate a polygonal chain with the specified tolerance. It is based on the Douglas-Peucker algorithm. Note that the approximated polygon is always within the convex hull of the original polygon. Parameters: coords : (N, 2) array Coordinate array. tolerance : float Maximum distance from original points of polygon to approximated polygonal chain. If tolerance is 0, the original coordinate array is retur

rotate

rotate skimage.transform.rotate(image, angle, resize=False, center=None, order=1, mode='constant', cval=0, clip=True, preserve_range=False) [source] Rotate image by a certain angle around its center. Parameters: image : ndarray Input image. angle : float Rotation angle in degrees in counter-clockwise direction. resize : bool, optional Determine whether the shape of the output image will be automatically calculated, so the complete rotated image exactly fits. Default is False. center :