Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 1 | #ifndef Y2023_VISION_GAME_PIECES_H_ |
| 2 | #define Y2023_VISION_GAME_PIECES_H_ |
| 3 | |
| 4 | #include "aos/events/shm_event_loop.h" |
| 5 | #include "frc971/vision/vision_generated.h" |
| 6 | #include "y2023/vision/game_pieces_generated.h" |
Filip Kujawa | 8c76e5d | 2023-04-08 16:20:27 -0700 | [diff] [blame] | 7 | #include "y2023/vision/yolov5.h" |
| 8 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 9 | namespace y2023::vision { |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 10 | |
| 11 | using namespace frc971::vision; |
| 12 | |
| 13 | // Takes in camera images and detects game pieces in the image. |
| 14 | // Note: Actual detection has not been implemented yet. |
| 15 | class GamePiecesDetector { |
| 16 | public: |
| 17 | GamePiecesDetector(aos::EventLoop *event_loop); |
| 18 | |
| 19 | void ProcessImage(const CameraImage &camera_image); |
| 20 | |
| 21 | private: |
| 22 | aos::Sender<GamePieces> game_pieces_sender_; |
Filip Kujawa | 8c76e5d | 2023-04-08 16:20:27 -0700 | [diff] [blame] | 23 | std::unique_ptr<YOLOV5> model; |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 24 | }; |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 25 | } // namespace y2023::vision |
Filip Kujawa | 3004f20 | 2023-02-12 16:41:40 -0800 | [diff] [blame] | 26 | #endif |