Image.draw_box#
- Image.draw_box(**kwargs: Any) None[source][source]#
Draw box into image
- Parameters:
kwargs – parameters passed to
draw_box
There are myriad ways to specify the corners of the box.
Example, draw boxes over the eyes of the Mona Lisa:
from machinevisiontoolbox import Image img = Image.Read("monalisa.png") img.draw_box(lb=(245,170), rt=(290, 210), color="yellow", thickness=5) img.draw_box(lb=(315, 175), rt=(370,205), color="blue", thickness=-1) 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: