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);
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.
vpRect getBoundingBox() const
vpImagePoint getCenter() const
const std::vector< vpImagePoint > & getCorners() 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.