skimage.draw.bresenham | Generate line pixel coordinates. |
skimage.draw.circle | Generate coordinates of pixels within circle. |
skimage.draw.circle_perimeter | Generate circle perimeter coordinates. |
skimage.draw.ellipse | Generate coordinates of pixels within ellipse. |
skimage.draw.ellipse_perimeter | Generate ellipse perimeter coordinates. |
skimage.draw.line | Generate line pixel coordinates. |
skimage.draw.polygon | Generate coordinates of pixels within polygon. |
skimage.draw.set_color | Set pixel color in the image at the given coordinates. |
Generate line pixel coordinates.
Parameters : | y, x : int
y2, x2 : int
|
---|---|
Returns : | rr, cc : (N,) ndarray of int
|
Generate coordinates of pixels within circle.
Parameters : | cy, cx : double
radius: double :
shape : tuple, optional
|
---|---|
Returns : | rr, cc : ndarray of int
Notes : —– :
|
Generate circle perimeter coordinates.
Parameters : | cy, cx : int
radius: int :
method : {‘bresenham’, ‘andres’}, optional
|
---|---|
Returns : | rr, cc : (N,) ndarray of int
|
Notes
Andres method presents the advantage that concentric circles create a disc whereas Bresenham can make holes. There is also less distortions when Andres circles are rotated. Bresenham method is also known as midpoint circle algorithm.
References
[R30] | J.E. Bresenham, “Algorithm for computer control of a digital plotter”, 4 (1965) 25-30. |
[R31] |
|
Generate coordinates of pixels within ellipse.
Parameters : | cy, cx : double
yradius, xradius : double
shape : tuple, optional
|
---|---|
Returns : | rr, cc : ndarray of int
|
Generate ellipse perimeter coordinates.
Parameters : | cy, cx : int
yradius, xradius: int :
|
---|---|
Returns : | rr, cc : (N,) ndarray of int
|
References
[R32] | J. Kennedy “A fast Bresenham type algorithm for drawing ellipses”. |
Generate line pixel coordinates.
Parameters : | y, x : int
y2, x2 : int
|
---|---|
Returns : | rr, cc : (N,) ndarray of int
|
Generate coordinates of pixels within polygon.
Parameters : | y : (N,) ndarray
x : (N,) ndarray
shape : tuple, optional
|
---|---|
Returns : | rr, cc : ndarray of int
|
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
coords : ((P,) ndarray, (P,) ndarray)
color : (D,) ndarray
|
---|---|
Returns : | img : (M, N, D) ndarray
|