aisingapore / PeekingDuck

A modular framework built to simplify Computer Vision inference workloads.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve draw.legend UI

JamesSng opened this issue · comments

Description
The current legend draws the background box with a fixed width (150 pixels). This can cause text to exceed the boundaries of the background box if the text is too long.

Proposed Solution
Use cv2.getTextSize() to precompute the required width of the background box.

Perhaps can include a config option to change the translucency of the box as well.