anki_vector.annotate

Camera image annotation.

../_images/annotate.png

This module defines an ImageAnnotator class used by anki_vector.camera.CameraImage and anki_vector.camera.CameraComponent to add annotations to camera images received by the robot.

This can include the location of cubes and faces that the robot currently sees, along with user-defined custom annotations.

The ImageAnnotator instance can be accessed as anki_vector.camera.CameraComponent.image_annotator.

Module Attributes

RESAMPLE_MODE_NEAREST

Fastest resampling mode, use nearest pixel

RESAMPLE_MODE_BILINEAR

Slower, but smoother, resampling mode - linear interpolation from 2x2 grid of pixels

Functions

add_img_box_to_image(draw, box, color[, text])

Draw a box on an image and optionally add text.

add_polygon_to_image(draw, poly_points, ...)

Draw a polygon on an image

annotator(f)

A decorator for converting a regular function/method into an Annotator.

Classes

AnnotationPosition(value[, names, module, ...])

Specifies where the annotation must be rendered.

Annotator(img_annotator[, priority])

Annotation base class

FaceAnnotator(img_annotator[, box_color])

Adds annotations of currently detected faces to a camera image.

ImageAnnotator(world, **kw)

ImageAnnotator applies annotations to the camera image received from the robot.

ImageText(text[, position, align, color, ...])

ImageText represents some text that can be applied to an image.

ObjectAnnotator(img_annotator[, object_colors])

Adds object annotations to an Image.

TextAnnotator(img_annotator, text)

Adds simple text annotations to a camera image.