40 #include <visp3/core/vpCameraParameters.h>
41 #include <visp3/core/vpColor.h>
42 #include <visp3/core/vpImage.h>
43 #include <visp3/core/vpImagePoint.h>
44 #include <visp3/core/vpPoint.h>
45 #include <visp3/core/vpRect.h>
120 explicit vpPolygon(
const std::vector<vpImagePoint> &corners);
121 explicit vpPolygon(
const std::list<vpImagePoint> &corners);
127 void buildFrom(
const std::vector<vpImagePoint> &corners,
const bool create_convex_hull =
false);
128 void buildFrom(
const std::list<vpImagePoint> &corners,
const bool create_convex_hull =
false);
130 const bool create_convex_hull =
false);
132 unsigned int getSize()
const;
134 unsigned int thickness = 1);
136 unsigned int thickness = 1);
138 bool isInside(
const vpImagePoint &iP,
const PointInPolygonMethod &method = PnPolyRayCasting)
const;
147 const std::vector<vpImagePoint> &
getCorners()
const {
return _corners; }
155 inline double getArea()
const {
return this->_area; }
174 void init(
const std::vector<vpImagePoint> &corners);
175 void init(
const std::list<vpImagePoint> &corners);
178 void updateBoundingBox();
183 void precalcValuesPnPoly();
185 std::vector<double> m_PnPolyConstants;
186 std::vector<double> m_PnPolyMultiples;
193 static bool isInside(
const std::vector<vpImagePoint> &roi,
const double &i,
const double &j,
194 const PointInPolygonMethod &method = PnPolyRayCasting);
Generic class defining intrinsic camera parameters.
Class to define RGB colors available for display functionalities.
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.