Skip to content

Commit

Permalink
fix: 再次修正由于背景光点导致的人物名称识别错误
Browse files Browse the repository at this point in the history
  • Loading branch information
weiduhuo committed Nov 1, 2023
1 parent f9c716d commit cafcdd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/relic.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def ocr_character_name(self) -> str:
:return character_name: 人物名称
"""
str = self.calculated.ocr_pos_for_single_line(points=(10.4,6,18,9) if IS_PC else (13,4,22,9)) # 识别人物名称 (主角名称为玩家自定义,无法适用预选列表)
character_name = re.sub(r"[.’,,。、·'-_——\"/\\]", '', str) # 删除由于背景光点造成的误判
character_name = re.sub(r"[.’,,。、·'-_——「」/|\[\]\"\\]", '', str) # 删除由于背景光点造成的误判
log.info(_(f"识别人物: {character_name}"))
if character_name not in self.loadout_data:
self.loadout_data = modify_json_file(LOADOUT_FILE_NAME, character_name, {})
Expand Down

0 comments on commit cafcdd9

Please sign in to comment.