Skip to content

Commit

Permalink
修Bug:引擎原始输出项的"text"为空时,导致文本分析的越界错误 (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroi-sora committed Aug 16, 2024
1 parent f601c3c commit cd7974f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ def _getBboxes(textBlocks, rotation_rad):
return bboxes


# 预处理 textBlocks ,将包围盒 ["box"] 转为标准化 bbox
# 预处理 textBlocks ,将包围盒 ["box"] 转为标准化 bbox ,同时去除 ["text"] 不完整的项
def linePreprocessing(textBlocks):
textBlocks = [i for i in textBlocks if i.get("text", False)]
# 判断角度
rotation_rad = _estimateRotation(textBlocks)
# 获取标准化bbox
Expand Down

0 comments on commit cd7974f

Please sign in to comment.