This commit is contained in:
HuangHai
2026-01-13 11:33:57 +08:00
parent 5d8db39b1f
commit a6f942f6e6
7 changed files with 43 additions and 16 deletions

View File

@@ -756,12 +756,6 @@ def crop_cards_from_image(img_path, output_dir=None, save_debug=True):
threshold_h = median_h * 0.70
for (y1, y2), card_h in zip(temp_valid_segments, heights):
# 【优化】过滤顶部非场站区域 (例如会员图标、搜索栏等)
# 场站列表通常在屏幕 35% 高度以后
if y1 / h < 0.35:
logger.info(f" Filtering out segment Y={y1}-{y2} because it's too high up (Top {y1/h:.2f} < 0.35).")
continue
if card_h < threshold_h:
logger.info(
f" Filtering out segment Y={y1}-{y2} (H={card_h}) because it's too short (Threshold={threshold_h:.1f}).")