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);
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,
Class to define RGB colors available for display functionnalities.
vpRect _bbox
Bounding box containing the polygon.
vpRect getBoundingBox() const
Defines a generic 2D polygon.
Generic class defining intrinsic camera parameters.
const std::vector< vpImagePoint > & getCorners() const
std::vector< vpImagePoint > _corners
Collection of image points containing the corners.
Defines a rectangle in the plane.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
double _area
Area of the polygon.
vpImagePoint getCenter() const