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_text

Example:

from machinevisiontoolbox import Image
img = Image.Read("monalisa.png")
img.draw_text((340,290), "Smile!", fontheight=40, color="yellow")
img.disp()

(Source code)

Note

If image has multiple planes then color should 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 image color can be a string color name.

Seealso:

draw_text