-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bugs with job libs in decoders
Added a smaller background tester
- Loading branch information
1 parent
4729172
commit 157d28f
Showing
5 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import back_decoder | ||
from utils import * | ||
from PIL import Image | ||
from PIL import ImageGrab | ||
|
||
import time | ||
board = (77, 164, 652, 670) | ||
|
||
backdec = back_decoder.BackRecognizer() | ||
backdec.train() | ||
|
||
board_dic = { | ||
curtain: 'curtain\n', | ||
end: 'end\n', | ||
intro: 'intro\n', | ||
loading: 'loading\n', | ||
move: 'move\n', | ||
scoreboard: 'scoreboard\n', | ||
shop: 'shop\n', | ||
static: 'static\n' | ||
} | ||
|
||
i = 1 | ||
while True: | ||
img = ImageGrab.grab() | ||
img = img.crop(board) | ||
print board_dic[backdec.predict(img)] | ||
time.sleep(0.4) |