Skip to content

Commit

Permalink
Recognition adjustments.
Browse files Browse the repository at this point in the history
Update resource version of informations.
Loading screen recognition adjustments.
  • Loading branch information
kaktuswald committed Jul 22, 2024
1 parent 7695b82 commit 9741f87
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions define.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class Define():

screens = {
'loading': {
'left': 940,
'top': 378,
'left': 380,
'top': 120,
'width': 4,
'height': 2
},
Expand Down Expand Up @@ -72,7 +72,7 @@ class Define():
informations_trimpos = (560, 960)
informations_trimsize = (800, 166)

informations_recognition_version = '3.0'
informations_recognition_version = '3.1'
informations_trimarea = (560, 960, 1360, 1066)

informations_areas = {
Expand Down
15 changes: 8 additions & 7 deletions recog.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,14 @@ def get_music(np_value_informations):

for height in range(masked.shape[0]):
unique, counts = np.unique(masked[height], return_counts=True)
if len(unique) == 1:
continue
index = -np.argmax(np.flip(counts[1:])) - 1
intensity = unique[index]
bins = np.where(masked[height]==intensity, 1, 0)
hexs = bins[::4]*8+bins[1::4]*4+bins[2::4]*2+bins[3::4]
tablekey = f"{height:02d}{''.join([format(v, '0x') for v in hexs])}"
if len(unique) > 1:
index = -np.argmax(np.flip(counts[1:])) - 1
intensity = unique[index]
bins = np.where(masked[height]==intensity, 1, 0)
hexs = bins[::4]*8+bins[1::4]*4+bins[2::4]*2+bins[3::4]
tablekey = f"{height:02d}{''.join([format(v, '0x') for v in hexs])}"
else:
tablekey = f'{height:02d}'
if not tablekey in targettable.keys():
break

Expand Down
Binary file modified resources/get_screen.res
Binary file not shown.
Binary file removed resources/informations3.0.res
Binary file not shown.
1 change: 0 additions & 1 deletion resources/informations3.0.res.timestamp

This file was deleted.

Binary file added resources/informations3.1.res
Binary file not shown.

0 comments on commit 9741f87

Please sign in to comment.