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 | Static Public Member Functions | Public Attributes | List of all members
OpenCVForUnity.CoreModule.Point Class Reference
Inheritance diagram for OpenCVForUnity.CoreModule.Point:

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
 

Detailed Description

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;

See also
org.opencv.core.Point_

Constructor & Destructor Documentation

◆ Point() [1/3]

OpenCVForUnity.CoreModule.Point.Point ( double  x,
double  y 
)

◆ Point() [2/3]

OpenCVForUnity.CoreModule.Point.Point ( )

◆ Point() [3/3]

OpenCVForUnity.CoreModule.Point.Point ( double []  vals)

Member Function Documentation

◆ clone()

Point OpenCVForUnity.CoreModule.Point.clone ( )

◆ dot()

double OpenCVForUnity.CoreModule.Point.dot ( Point  p)

◆ Equals() [1/2]

bool OpenCVForUnity.CoreModule.Point.Equals ( Point  a)

◆ Equals() [2/2]

override bool OpenCVForUnity.CoreModule.Point.Equals ( Object  obj)

◆ GetHashCode()

override int OpenCVForUnity.CoreModule.Point.GetHashCode ( )

◆ inside()

bool OpenCVForUnity.CoreModule.Point.inside ( Rect  r)

◆ operator!=()

static bool OpenCVForUnity.CoreModule.Point.operator!= ( Point  a,
Point  b 
)
static

◆ operator*() [1/2]

static Point OpenCVForUnity.CoreModule.Point.operator* ( Point  a,
double  b 
)
static

◆ operator*() [2/2]

static Point OpenCVForUnity.CoreModule.Point.operator* ( double  a,
Point  b 
)
static

◆ operator+()

static Point OpenCVForUnity.CoreModule.Point.operator+ ( Point  a,
Point  b 
)
static

◆ operator-() [1/2]

static Point OpenCVForUnity.CoreModule.Point.operator- ( Point  a)
static

◆ operator-() [2/2]

static Point OpenCVForUnity.CoreModule.Point.operator- ( Point  a,
Point  b 
)
static

◆ operator/()

static Point OpenCVForUnity.CoreModule.Point.operator/ ( Point  a,
double  b 
)
static

◆ operator==()

static bool OpenCVForUnity.CoreModule.Point.operator== ( Point  a,
Point  b 
)
static

◆ set()

void OpenCVForUnity.CoreModule.Point.set ( double []  vals)

◆ ToString()

override string OpenCVForUnity.CoreModule.Point.ToString ( )

Member Data Documentation

◆ x

double OpenCVForUnity.CoreModule.Point.x

The documentation for this class was generated from the following files: