mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 00:28:20 +08:00
Refactor: Digit ocr white list
This commit is contained in:
@@ -13,16 +13,16 @@ OCR_SHOP_MEDAL = Digit(SHOP_MEDAL, letter=(239, 239, 239), name='OCR_SHOP_MEDAL'
|
||||
MEDAL_SHOP_SCROLL = Scroll(MEDAL_SHOP_SCROLL_AREA, color=(247, 211, 66))
|
||||
|
||||
|
||||
class DigitPatch(Digit):
|
||||
class ShopPriceOcr(Digit):
|
||||
def after_process(self, result):
|
||||
result = Ocr.after_process(self, result)
|
||||
# '100' detected as '00' on retrofit blueprint
|
||||
if result == '00':
|
||||
result = '100'
|
||||
return Digit.after_process(self, result.split())
|
||||
return Digit.after_process(self, result)
|
||||
|
||||
|
||||
PRICE_OCR = DigitPatch([], letter=(255, 223, 57), threshold=32, name='Price_ocr')
|
||||
PRICE_OCR = ShopPriceOcr([], letter=(255, 223, 57), threshold=32, name='Price_ocr')
|
||||
TEMPLATE_MEDAL_ICON = Template('./assets/shop/cost/Medal.png')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user