machinevisiontoolbox.Image.draw_line
- Image.draw_line(start, end, **kwargs)[source]
Draw line into image
- Parameters:
start (array_like(2)) – start coordinate (u,v)
end (array_like(2)) – end coordinate (u,v)
kwargs – parameters passed to
draw_line
Example:
>>> from machinevisiontoolbox import Image >>> img = Image.Zeros(100) >>> img.draw_line((20,30), (60,70), color=200) >>> img.disp() <matplotlib.image.AxesImage object at 0x7f3d3a61a250> >>> img = Image.Zeros(100, colororder="RGB") >>> img.draw_line((20,30), (60,70), color=[0, 200, 0]) # green line >>> img.disp() <matplotlib.image.AxesImage object at 0x7f3d3a61adf0>
- Note:
If the image has N planes the color should have N elements.
- Seealso: