mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-05-11 06:00:31 +08:00
Merge pull request #4519 from guoh064/jp_commission
Revert JP commission ocr modification
This commit is contained in:
@@ -36,14 +36,6 @@ class SuffixOcr(Ocr):
|
|||||||
if len(left):
|
if len(left):
|
||||||
image = image[:, left[-1] - look_back:]
|
image = image[:, left[-1] - look_back:]
|
||||||
|
|
||||||
if server.server in ['jp']:
|
|
||||||
# slice top and bottom part to get clearer roman digits
|
|
||||||
# will need to pad white background for better recognization
|
|
||||||
image = image[8:-10, :]
|
|
||||||
cv2.normalize(image, image, -55, 255, cv2.NORM_MINMAX)
|
|
||||||
image = (image > 80).astype(np.uint8) * 255
|
|
||||||
image = np.pad(image, ((0, 1), (0, 0)), mode='edge')
|
|
||||||
image = np.pad(image, ((4, 3), (0, 0)), mode='constant', constant_values=255)
|
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
||||||
@@ -175,7 +167,7 @@ class Commission:
|
|||||||
self.genre = self.commission_name_parse(self.name)
|
self.genre = self.commission_name_parse(self.name)
|
||||||
|
|
||||||
# Suffix
|
# Suffix
|
||||||
ocr = SuffixOcr(button, lang='azur_lane', letter=(201, 201, 201), threshold=128, alphabet='IV')
|
ocr = SuffixOcr(button, lang='azur_lane', letter=(255, 255, 255), threshold=128, alphabet='IV')
|
||||||
self.suffix = self.beautify_name(ocr.ocr(self.image))
|
self.suffix = self.beautify_name(ocr.ocr(self.image))
|
||||||
|
|
||||||
# Duration time
|
# Duration time
|
||||||
|
|||||||
Reference in New Issue
Block a user