Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 1 | namespace y2023.vision; |
| 2 | |
| 3 | // Object class. |
| 4 | enum Class : byte { |
| 5 | CONE_DOWN, |
| 6 | CONE_UP, |
| 7 | CUBE |
| 8 | } |
| 9 | |
| 10 | // Bounding box dimensions and position. |
Filip Kujawa | b72ca2d | 2023-02-26 17:38:54 -0800 | [diff] [blame^] | 11 | // X and Y represent the top left of the bounding box. |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 12 | table Box { |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 13 | x:uint (id: 0); |
| 14 | y:uint (id: 1); |
| 15 | w:uint (id: 2); |
| 16 | h:uint (id: 3); |
| 17 | } |
| 18 | |
| 19 | table GamePiece { |
| 20 | piece_class:Class (id: 0); |
| 21 | box:Box (id:1); |
| 22 | confidence:float (id:2); |
| 23 | } |
| 24 | |
| 25 | table GamePieces { |
| 26 | game_pieces:[GamePiece] (id: 0); |
Filip Kujawa | b72ca2d | 2023-02-26 17:38:54 -0800 | [diff] [blame^] | 27 | best_piece:uint (id: 1); // Index of the "best piece". |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | root_type GamePieces; |