OpenCV for Unity
2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
Public Member Functions | |
Point (double x, double y) | |
Point () | |
Point (double[] vals) | |
void | set (double[] vals) |
Point | clone () |
double | dot (Point p) |
override int | GetHashCode () |
override bool | Equals (Object obj) |
bool | inside (Rect r) |
override string | ToString () |
bool | Equals (Point a) |
Static Public Member Functions | |
static Point | operator- (Point a) |
static Point | operator+ (Point a, Point b) |
static Point | operator- (Point a, Point b) |
static Point | operator* (Point a, double b) |
static Point | operator* (double a, Point b) |
static Point | operator/ (Point a, double b) |
static bool | operator== (Point a, Point b) |
static bool | operator!= (Point a, Point b) |
Public Attributes | |
double | x |
template<typename _Tp> class CV_EXPORTS Point_
// C++ code:
public:
typedef _Tp value_type;
// various constructors
Point_();
Point_(_Tp _x, _Tp _y);
Point_(const Point_& pt);
Point_(const CvPoint& pt);
Point_(const CvPoint2D32f& pt);
Point_(const Size_<_Tp>& sz);
Point_(const Vec<_Tp, 2>& v);
Point_& operator = (const Point_& pt);
//! conversion to another data type
template<typename _Tp2> operator Point_<_Tp2>() const;
//! conversion to the old-style C structures
operator CvPoint() const;
operator CvPoint2D32f() const;
operator Vec<_Tp, 2>() const;
//! dot product
_Tp dot(const Point_& pt) const;
//! dot product computed in double-precision arithmetics
double ddot(const Point_& pt) const;
//! cross-product
double cross(const Point_& pt) const;
//! checks whether the point is inside the specified rectangle
bool inside(const Rect_<_Tp>& r) const;
_Tp x, y; //< the point coordinates
};
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 thisoperation for each of the coordinates. Besides the class members listed in the declaration above, the following operations on points are implemented:
// C++ code:
pt1 = pt2 + pt3;
pt1 = pt2 - pt3;
pt1 = pt2 * a;
pt1 = a * pt2;
pt1 += pt2;
pt1 -= pt2;
pt1 *= a;
double value = norm(pt); // L2 norm
pt1 == pt2;
pt1 != pt2;
For your convenience, the following type aliases are defined:
typedef Point_<int> Point2i;
typedef Point2i Point;
typedef Point_<float> Point2f;
typedef Point_<double> Point2d;
Example:
Point2f a(0.3f, 0.f), b(0.f, 0.4f);
Point pt = (a + b)*10.f;
cout << pt.x << ", " << pt.y << endl;
OpenCVForUnity.CoreModule.Point.Point | ( | double | x, |
double | y | ||
) |
OpenCVForUnity.CoreModule.Point.Point | ( | ) |
OpenCVForUnity.CoreModule.Point.Point | ( | double [] | vals | ) |
Point OpenCVForUnity.CoreModule.Point.clone | ( | ) |
double OpenCVForUnity.CoreModule.Point.dot | ( | Point | p | ) |
bool OpenCVForUnity.CoreModule.Point.Equals | ( | Point | a | ) |
override bool OpenCVForUnity.CoreModule.Point.Equals | ( | Object | obj | ) |
override int OpenCVForUnity.CoreModule.Point.GetHashCode | ( | ) |
bool OpenCVForUnity.CoreModule.Point.inside | ( | Rect | r | ) |
void OpenCVForUnity.CoreModule.Point.set | ( | double [] | vals | ) |
override string OpenCVForUnity.CoreModule.Point.ToString | ( | ) |
double OpenCVForUnity.CoreModule.Point.x |