Skip to content

Commit

Permalink
Fix: Handle yet another CLEAR icon
Browse files Browse the repository at this point in the history
  • Loading branch information
LmeSzinc committed Jul 25, 2024
1 parent 7ec61a7 commit 5291bc4
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions module/campaign/campaign_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ def campaign_extract_name_image(self, image):
similarity=0.6,
name_offset=(52, 0), name_size=(60, 22)
)
if '20240725' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(
TEMPLATE_STAGE_CLEAR_20240725,
image, self._stage_image_gray,
name_offset=(73, -4), name_size=(60, 22)
)

return digits

Expand Down Expand Up @@ -233,6 +239,12 @@ def campaign_extract_name_image(self, image):
similarity=0.6,
name_offset=(52, 0), name_size=(60, 22)
)
if '20240725' in self.config.STAGE_ENTRANCE:
digits += self.campaign_match_multi(
TEMPLATE_STAGE_CLEAR_20240725,
image, self._stage_image_gray,
name_offset=(73, -4), name_size=(60, 22)
)

return digits

Expand Down
1 change: 1 addition & 0 deletions module/template/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
TEMPLATE_STAGE_BLUE_CLEAR = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_BLUE_CLEAR.png', 'en': './assets/en/template/TEMPLATE_STAGE_BLUE_CLEAR.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_BLUE_CLEAR.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_BLUE_CLEAR.png'})
TEMPLATE_STAGE_BLUE_PERCENT = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_BLUE_PERCENT.png', 'en': './assets/en/template/TEMPLATE_STAGE_BLUE_PERCENT.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_BLUE_PERCENT.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_BLUE_PERCENT.png'})
TEMPLATE_STAGE_CLEAR = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_CLEAR.png', 'en': './assets/en/template/TEMPLATE_STAGE_CLEAR.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_CLEAR.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_CLEAR.png'})
TEMPLATE_STAGE_CLEAR_20240725 = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_CLEAR_20240725.png', 'en': './assets/en/template/TEMPLATE_STAGE_CLEAR_20240725.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_CLEAR_20240725.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_CLEAR_20240725.png'})
TEMPLATE_STAGE_CLEAR_SMALL = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_CLEAR_SMALL.png', 'en': './assets/cn/template/TEMPLATE_STAGE_CLEAR_SMALL.png', 'jp': './assets/cn/template/TEMPLATE_STAGE_CLEAR_SMALL.png', 'tw': './assets/cn/template/TEMPLATE_STAGE_CLEAR_SMALL.png'})
TEMPLATE_STAGE_GREEN_CLEAR = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_GREEN_CLEAR.png', 'en': './assets/en/template/TEMPLATE_STAGE_GREEN_CLEAR.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_GREEN_CLEAR.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_GREEN_CLEAR.png'})
TEMPLATE_STAGE_HALF_PERCENT = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_HALF_PERCENT.png', 'en': './assets/en/template/TEMPLATE_STAGE_HALF_PERCENT.png', 'jp': './assets/jp/template/TEMPLATE_STAGE_HALF_PERCENT.png', 'tw': './assets/tw/template/TEMPLATE_STAGE_HALF_PERCENT.png'})
Expand Down

0 comments on commit 5291bc4

Please sign in to comment.