Frame Overlay
app.shared.frame_overlayModule for frame overlay; provides reusable helpers across application layers.
See Also
UIHandler— supplies live-preview annotations to the Qt overlayBBoxViewModel— provides annotation geometry and styling
Layer: Shared utilities. Context: Provides reusable helpers across application layers at this architectural boundary.
draw_frame_overlays(frame: RGBFrame, boxes: ListOfBoxes | None, border_width: int = 2) -> RGBFrame
Draw raster box borders and labels onto a copy of an RGB frame.
| PARAMETER | DESCRIPTION |
|---|---|
frame
|
RGB frame to annotate.
TYPE:
|
boxes
|
Boxes displayed in the current editor tab, or
TYPE:
|
border_width
|
Border width in pixels from 1 to 10.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
RGBFrame
|
A frame with overlays, or the original frame if there are no boxes. |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If |
Note
This is a standalone raster helper. The live editor paints annotations in its Qt overlay so their size is independent of source resolution. Exported video rendering never calls this helper.
Example
preview = draw_frame_overlays(frame, tracked_boxes, border_width=3)