-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREAD.ME
More file actions
23 lines (19 loc) · 1.22 KB
/
Copy pathREAD.ME
File metadata and controls
23 lines (19 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
1. used libraries
numpy 2.1.3
opencv-python 4.10.0
2. how to run each task and where to look for the output file.
Task 1 and Task 2:
script: script_predictii.py
functions: extrage_careu(image), extrage_patrat(img1, a, b), extrage_piese(img1, img2), identify_piece(target_img)
extrage_careu returns only the relevant part of the photos
extrage_patrat return a specific piece on the board with indexes a and b
extrage_piese calculates the mean difference for every possible piece on 2 photos and for the biggest one calls identify_piece using the previous 2 functions
identify_piece returns the most probable number for a specifiec piece I pass as an argument
Calling extrage_piese calls all the other functions and return a response for both Task 1 and Task 2
output: the output file is output/turn.txt, where turn is the name of every turn of the game
Task 3:
script: script_predictii.py
functions: get_score(numar, locatie, tabla), tabla_start()
tabla_start return the game board without any pieces on it
get_score calculates the score for each piece added based on the outputs of Task 1 and Task 2
output: the output file is output/x_scores.txt, where x is the number for each game