#pragma once #include #include #include using std::cout; using std::endl; using std::vector; //击打板点类 class armorPoint { public: cv::Point2f p; double distance; }; //上一帧的信息类 class PreviousFrameInfo { public: vector previousFramePoints; std::chrono::duration elapsedTime; bool firstFrame = true; double dt; }; class TargetInfo{ public: vector target_points_; double target_speed_; double radius_; cv::Point2f centor_; }; void drawRotatedRect(cv::Mat image, const cv::RotatedRect& rect, const cv::Scalar& color, int thickness); double distance(cv::Point a, cv::Point b); TargetInfo findTarget(cv::Mat rawImages, PreviousFrameInfo & previousFrameInfo, cv::Mat mask);