mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-11 06:25:39 +08:00
Upd: Update ShopItem_250814 method predict_valid, use np.max
This commit is contained in:
@@ -46,9 +46,13 @@ FILTER = Filter(FILTER_REGEX, FILTER_ATTR)
|
|||||||
|
|
||||||
|
|
||||||
class ShopItem_250814(Item):
|
class ShopItem_250814(Item):
|
||||||
|
"""
|
||||||
|
Calculation result of unsold ship_T2 is 0.36, so 0.3 is taken as threshold,
|
||||||
|
result of sold product is < 0.2
|
||||||
|
"""
|
||||||
def predict_valid(self):
|
def predict_valid(self):
|
||||||
mean = np.mean(rgb2gray(self.image) > 139)
|
mean = np.mean(np.max(self.image, axis=2) > 139)
|
||||||
return mean > 0.23
|
return mean > 0.3
|
||||||
|
|
||||||
|
|
||||||
class ShopItemGrid(ItemGrid):
|
class ShopItemGrid(ItemGrid):
|
||||||
|
|||||||
Reference in New Issue
Block a user