Skip to content

Draws bounding boxes on an image. The image and the boxes coordinates are given as parameters, the output is a new image in the same format as the input.

Notifications You must be signed in to change notification settings

swiss-ai-center/image-draw-bounding-boxes

Repository files navigation

Image Draw Bounding Boxes

This microservice draws boxes on an image. It is intended to work with the text recognition OCR service. The bounding boxes are passed in a JSON file that corresponds to the output of the text recognition service. Namely, it must have the following structure:

{"boxes":[
    "position":{
        "left": ...,
        "top": ...,
        "width": ...,
        "height": ...,
    },
    {"position": ...},
    ...
]}

Where the values in "left", "top", "width" and "height" are given in pixels. The bounding boxes are drawn as red unfilled rectangles at the coordinates specified by the 4 fields above.

The JSON file may contain additional fields; they will be ignored.

Check the related documentation for more information.

About

Draws bounding boxes on an image. The image and the boxes coordinates are given as parameters, the output is a new image in the same format as the input.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages