template<typename _Tp>
class cv::Point_< _Tp >
Template class for 2D points specified by its coordinates x
and y
.
An instance of the class is interchangeable with C structures, CvPoint and CvPoint2D32f . There is also a cast operator to convert point coordinates to the specified type. The conversion from floating-point coordinates to integer coordinates is done by rounding. Commonly, the conversion uses this operation for each of the coordinates. Besides the class members listed in the declaration above, the following operations on points are implemented:
CV_EXPORTS_W double norm(InputArray src1, int normType=NORM_L2, InputArray mask=noArray())
Calculates the absolute norm of an array.
int CvScalar value
Definition core_c.h:720
CvPoint2D32f pt[4]
Definition imgproc_c.h:571
CvPoint pt1
Definition imgproc_c.h:357
CvPoint CvPoint pt2
Definition imgproc_c.h:357
For your convenience, the following type aliases are defined:
Template class for 2D points specified by its coordinates x and y.
Definition types.hpp:163
Point_< int > Point2i
Definition types.hpp:205
Point2i Point
Definition types.hpp:209
Point_< double > Point2d
Definition types.hpp:208
Point_< float > Point2f
Definition types.hpp:207
Example:
Point2f a(0.3f, 0.f), b(0.f, 0.4f);
cout <<
pt.
x <<
", " <<
pt.
y << endl;
float x
Definition types_c.h:978
float y
Definition types_c.h:979