From 16933d486bfdd74c51e0d662158aabc379969fe7 Mon Sep 17 00:00:00 2001 From: Paillat Date: Tue, 9 Dec 2025 00:41:23 +0100 Subject: [PATCH] :bug: Adjust flag detection tolerance to improve accuracy (#6) --- src/renderer/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/base.py b/src/renderer/base.py index 91058f2..41c7ecf 100644 --- a/src/renderer/base.py +++ b/src/renderer/base.py @@ -121,7 +121,7 @@ class FlagRenderer: video_path = await page.video.path() # ty:ignore[possibly-missing-attribute] return await asyncio.to_thread(self._manipulate_video, Path(video_path), trim_time=load_time) - def _detect_flag_bounds(self, frame: np.ndarray, tolerance: int = 60) -> tuple[int, int, int, int]: + def _detect_flag_bounds(self, frame: np.ndarray, tolerance: int = 35) -> tuple[int, int, int, int]: """Detect the flag boundaries in a frame by scanning for non-greenscreen pixels. Args: