std::vector<cv::Point2d> vanCorner_;bool inArea(const Pose &pos)
{cv::Point2d point = cv::Point2d(pos.position.x(), pos.position.y());double distance = cv::pointPolygonTest(vanCorner_, point, false);return distance >= 0;
}
似乎效果不太好,会误报
github
https://github.com/xuzebin/point-in-polygon
https://github.com/sasamil/PointInPolygon