@@ -262,7 +262,7 @@ def plot_rec_box_with_logic_info(img_path, output_path, logic_points, sorted_pol
262262 y1 = round (y1 )
263263 cv2 .rectangle (img , (x0 , y0 ), (x1 , y1 ), (0 , 0 , 255 ), 1 )
264264 # 增大字体大小和线宽
265- font_scale = 0.7 # 原先是0.5
265+ font_scale = 0.9 # 原先是0.5
266266 thickness = 1 # 原先是1
267267 logic_point = logic_points [idx ]
268268 cv2 .putText (
@@ -309,13 +309,13 @@ def plot_rec_box(img_path, output_path, sorted_polygons):
309309 y1 = round (y1 )
310310 cv2 .rectangle (img , (x0 , y0 ), (x1 , y1 ), (0 , 0 , 255 ), 1 )
311311 # 增大字体大小和线宽
312- font_scale = 1.0 # 原先是0.5
313- thickness = 2 # 原先是1
312+ font_scale = 0.9 # 原先是0.5
313+ thickness = 1 # 原先是1
314314
315315 cv2 .putText (
316316 img ,
317317 str (idx ),
318- (x1 , y1 ),
318+ (x0 + 5 , y0 + 5 ),
319319 cv2 .FONT_HERSHEY_PLAIN ,
320320 font_scale ,
321321 (0 , 0 , 255 ),
@@ -392,7 +392,7 @@ def gather_ocr_list_by_row(ocr_list: List[Any], threhold: float = 0.2) -> List[A
392392 cur [0 ], next [0 ], axis = "y" , threhold = threhold
393393 )
394394 if c_idx :
395- dis = max (next_box [0 ] - cur_box [0 ], 0 )
395+ dis = max (next_box [0 ] - cur_box [2 ], 0 )
396396 blank_str = int (dis / threshold ) * " "
397397 cur [1 ] = cur [1 ] + blank_str + next [1 ]
398398 xmin = min (cur_box [0 ], next_box [0 ])
0 commit comments