45 #include <visp3/core/vpImagePoint.h>
46 #include <visp3/core/vpRect.h>
47 #include <visp3/core/vpColor.h>
48 #include <visp3/core/vpImage.h>
49 #include <visp3/core/vpPoint.h>
50 #include <visp3/core/vpCameraParameters.h>
114 vpPolygon(
const std::vector<vpImagePoint>& corners);
120 void buildFrom(
const std::vector<vpImagePoint>& corners);
155 return this->_center;
169 void init(
const std::vector<vpImagePoint>& corners);
172 void updateBoundingBox();
182 static bool isInside(
const std::vector<vpImagePoint>& roi,
const double &i,
const double &j);
184 static bool intersect(
const vpImagePoint& p1,
const vpImagePoint& p2,
const double &i,
const double &j,
const double &i_test,
const double &j_test);
const std::vector< vpImagePoint > & getCorners() const
Class to define colors available for display functionnalities.
vpRect _bbox
Boumding box containing the polygon.
vpImagePoint _center
Center of the polygon. It is automatically computed when the corners are set.
Defines a generic 2D polygon.
vpRect getBoundingBox() const
Generic class defining intrinsic camera parameters.
vpImagePoint getCenter() const
std::vector< vpImagePoint > _corners
Collection of image points containing the corners.
bool _goodPoly
Flag to indicate whether the polygon is a good polygon (ie. it has more than two 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.