mirror of
https://github.com/Paillat-dev/flagger.git
synced 2026-01-02 01:06:21 +00:00
🐛 Adjust flag detection tolerance to improve accuracy (#6)
This commit is contained in:
@@ -121,7 +121,7 @@ class FlagRenderer:
|
|||||||
video_path = await page.video.path() # ty:ignore[possibly-missing-attribute]
|
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)
|
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.
|
"""Detect the flag boundaries in a frame by scanning for non-greenscreen pixels.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
Reference in New Issue
Block a user