Image.draw_text#
- Image.draw_text(pos: tuple[int, int] | ndarray, text: str, **kwargs: Any) None[source][source]#
Draw text into image :param pos: text position (u,v) :type pos: array_like(2) :param text: text to draw :type text: str :param kwargs: parameters passed to
draw_textExample:
from machinevisiontoolbox import Image img = Image.Read("monalisa.png") img.draw_text((340,290), "Smile!", fontheight=40, color="yellow") img.disp()
Note
If
imagehas multiple planes thencolorshould have the same number of elements as the image has planes. If it is a scalar that value is used for each color plane. For a color imagecolorcan be a string color name.- Seealso: