{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / draw / draw / line_aa

function

skimage.draw.draw:line_aa

source: /dev/scikit-image/src/skimage/draw/draw.py :402

Signature

def   line_aa ( r0 c0 r1 c1 )

Summary

Generate anti-aliased line pixel coordinates.

Parameters

r0, c0 : int

Starting position (row, column).

r1, c1 : int

End position (row, column).

Returns

rr, cc, val : (N,) ndarray (int, int, float)

Indices of pixels (rr, cc) and intensity values (val). img[rr, cc] = val.

Examples

from skimage.draw import line_aa
img = np.zeros((10, 10), dtype=np.uint8)
rr, cc, val = line_aa(1, 1, 8, 8)
img[rr, cc] = val * 255
img

Aliases

  • skimage.draw.line_aa