47 #include <visp3/core/vpCameraParameters.h>
48 #include <visp3/core/vpColor.h>
49 #include <visp3/core/vpImage.h>
50 #include <visp3/core/vpImagePoint.h>
51 #include <visp3/core/vpPoint.h>
52 #include <visp3/core/vpRect.h>
127 explicit vpPolygon(
const std::vector<vpImagePoint> &corners);
128 explicit vpPolygon(
const std::list<vpImagePoint> &corners);
134 void buildFrom(
const std::vector<vpImagePoint> &corners);
135 void buildFrom(
const std::list<vpImagePoint> &corners);
138 unsigned int getSize()
const;
140 unsigned int thickness = 1);
142 unsigned int thickness = 1);
144 bool isInside(
const vpImagePoint &iP,
const PointInPolygonMethod &method = PnPolyRayCasting)
const;
153 const std::vector<vpImagePoint> &
getCorners()
const {
return _corners; }
161 inline double getArea()
const {
return this->_area; }
180 void init(
const std::vector<vpImagePoint> &corners);
181 void init(
const std::list<vpImagePoint> &corners);
184 void updateBoundingBox();
189 void precalcValuesPnPoly();
191 std::vector<double> m_PnPolyConstants;
192 std::vector<double> m_PnPolyMultiples;
199 static bool isInside(
const std::vector<vpImagePoint> &roi,
const double &i,
const double &j,
200 const PointInPolygonMethod &method = PnPolyRayCasting);