import sys, os
sys.path.insert(0, ".")
from pathlib import Path
import src.common as common

images = [
    "captures/pipeline_run/20260920_055832_346_STAGE2_MAP_DEVICE_VIEW.png",
    "captures/pipeline_run/20260920_055839_600_STAGE2_MAP_DEVICE_VIEW_APPROACH_AVOID.png",
    "captures/pipeline_run/20260920_055841_377_STAGE2_MAP_DEVICE_VIEW_APPROACH_1.png",
    "captures/pipeline_run/20260920_055843_157_STAGE2_MAP_DEVICE_VIEW_APPROACH_2.png",
    "captures/pipeline_run/20260920_055844_935_STAGE2_MAP_DEVICE_VIEW_APPROACH_3.png",
    "captures/pipeline_run/20260920_055845_801_STAGE2_MAP_DEVICE_HOVERED.png",
]

sx = 1197.0 / 1920.0
sy = 897.0 / 1080.0

for p in images:
    fname = os.path.basename(p)
    pos = common.find_map_device_screen_pos(p, scale_x=sx, scale_y=sy)
    vis = common.is_map_device_visible(p)
    print(f"{fname} -> pos: {pos}, visible: {vis}")
