Skip to content

Commit

Permalink
Ensure that birdseye error correction uses a resolution that is divis…
Browse files Browse the repository at this point in the history
…ible by 4
  • Loading branch information
NickM-27 committed Oct 31, 2023
1 parent ba603c1 commit 3bcff2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frigate/output.py
Expand Up @@ -63,8 +63,8 @@ def get_canvas_shape(width: int, height: int) -> tuple[int, int]:
a_w, a_h = get_standard_aspect_ratio(width, height)

if round(a_w / a_h, 2) != round(width / height, 2):
canvas_width = width
canvas_height = int((canvas_width / a_w) * a_h)
canvas_width = int(width // 4 * 4)
canvas_height = int((canvas_width / a_w * a_h) // 4 * 4)
logger.warning(
f"The birdseye resolution is a non-standard aspect ratio, forcing birdseye resolution to {canvas_width} x {canvas_height}"
)
Expand Down

0 comments on commit 3bcff2a

Please sign in to comment.