drawAnnotations static method
void
drawAnnotations(})
draw a box on the supplied Image around the detected object using Vertex
values
Implementation
static void drawAnnotations(Image image, List<Vertex> vertices,
{String color = 'red', int thickness = 3}) {
for (var index = 0; index < vertices.length - 1; index++) {
final vStart = vertices[index];
final vStop = vertices[index + 1];
image.drawLine(vStart.x, vStart.y, vStop.x, vStop.y, RgbColor.name(color),
thickness: thickness);
}
image.drawLine(vertices.last.x, vertices.last.y, vertices.first.x,
vertices.first.y, RgbColor.name(color),
thickness: thickness);
}