Image.draw_labelbox#
- Image.draw_labelbox(text: str, **kwargs: Any) None[source][source]#
Draw label box into image
- Parameters:
text (str) – text for the box label
kwargs – parameters passed to
draw_labelboxto specify the box position, color, etc.
The box position is specified by the parameters accepted by
draw_boxExample:
from machinevisiontoolbox import Image img = Image.Read("monalisa.png") img.draw_labelbox("Face", lb=(243,111), rt=(394,329), color="yellow", fontheight=20) 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: