Table of contents

ImageDrawer

The ImageDrawer class is a utility class for drawing various shapes on images.

Definition

Module: dynamsoft_utility

class ImageDrawer:

Methods

Method Description
draw_on_image Draws various shapes on an image.

draw_on_image

Draws various shapes on an image.

def draw_on_image(
    self,
    image: ImageData,
    shapes: Union[
        List[Quadrilateral],
        List[LineSegment],
        List[Contour],
        List[Corner],
        List[Edge],
    ],
    color: int = 0xFFFF0000,
    thickness: int = 1,
) -> ImageData:

Parameters

image The image data to draw on.

shapes The shapes to draw.

color The color to use for drawing. Defaults to 0xFFFF0000 (red).

thickness The thickness of the lines to draw. Defaults to 1.

Return value

An ImageData object representing the modified image data.

See Also

ImageData

Quadrilateral

LineSegment

Contour

Corner

Edge

Is this page helpful?

YesYes NoNo

In this article: