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