update sorting tolerance

This commit is contained in:
unknown
2026-01-25 09:50:10 +08:00
parent bac8690c35
commit 1d1dd6820d
7 changed files with 162 additions and 2 deletions
+1 -1
View File
@@ -509,7 +509,7 @@ class Stitcher:
heights = [b[3] - b[1] for b in cropped_boxes]
median_height = np.median(heights) if heights else target_h
# Use a fraction of the box height as tolerance (e.g., 20% of box height)
row_tolerance = max(1, int(median_height * 0.2))
row_tolerance = max(1, int(median_height * 0.4))
# Quantize y-coordinates to group boxes into rows
def get_row_key(box):