添加涂抹关键词自定义偏移量功能
This commit is contained in:
@@ -150,7 +150,7 @@ def get_mask_layout(image, name, id_card_num):
|
||||
match_list = re.findall(key["key"], layout[1])
|
||||
for m in match_list:
|
||||
if m in layout[1]:
|
||||
boxes += find_boxes(m, layout, offset=len(m), length=key["length"])
|
||||
boxes += find_boxes(m, layout, offset=key.get("offset", len(m)), length=key["length"])
|
||||
if match_list:
|
||||
break
|
||||
return boxes
|
||||
|
||||
Reference in New Issue
Block a user