I would like to be able to draw lines into numpy arrays to get off-line features for on-line handwriting recognition. This means I don\'t need the image at all, but I need f
Thanks to Joe Kington for the answer! I was looking for skimage.draw.line_aa.
import scipy.misc import numpy as np from skimage.draw import line_aa img = np.zeros((10, 10), dtype=np.uint8) rr, cc, val = line_aa(1, 1, 8, 4) img[rr, cc] = val * 255 scipy.misc.imsave("out.png", img)