49 #include <visp3/core/vpCameraParameters.h>
50 #include <visp3/core/vpColor.h>
51 #include <visp3/core/vpImage.h>
52 #include <visp3/core/vpImagePoint.h>
53 #include <visp3/core/vpPoint.h>
54 #include <visp3/core/vpRect.h>
129 explicit vpPolygon(
const std::vector<vpImagePoint> &corners);
130 explicit vpPolygon(
const std::list<vpImagePoint> &corners);
136 void buildFrom(
const std::vector<vpImagePoint> &corners,
const bool create_convex_hull =
false);
137 void buildFrom(
const std::list<vpImagePoint> &corners,
const bool create_convex_hull =
false);
139 const bool create_convex_hull =
false);
141 unsigned int getSize()
const;
143 unsigned int thickness = 1);
145 unsigned int thickness = 1);
147 bool isInside(
const vpImagePoint &iP,
const PointInPolygonMethod &method = PnPolyRayCasting)
const;
156 const std::vector<vpImagePoint> &
getCorners()
const {
return _corners; }
164 inline double getArea()
const {
return this->_area; }
183 void init(
const std::vector<vpImagePoint> &corners);
184 void init(
const std::list<vpImagePoint> &corners);
187 void updateBoundingBox();
192 void precalcValuesPnPoly();
194 std::vector<double> m_PnPolyConstants;
195 std::vector<double> m_PnPolyMultiples;
202 static bool isInside(
const std::vector<vpImagePoint> &roi,
const double &i,
const double &j,
203 const PointInPolygonMethod &method = PnPolyRayCasting);
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionnalities.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Defines a generic 2D polygon.
const std::vector< vpImagePoint > & getCorners() const
vpRect getBoundingBox() const
vpImagePoint getCenter() const
vpRect _bbox
Bounding box containing the polygon.
@ PnPolySegmentIntersection
std::vector< vpImagePoint > _corners
Collection of image points containing the corners.
double _area
Area of the polygon.
Defines a rectangle in the plane.