Point object type
Another very common class template is Point. This class defines a 2D point specified by its coordinates x and y.
Like Point, there is a Point3 template class for 3D point support.
Like the Vec class, OpenCV defines the following Point aliases for our convenience:
typedef Point_<int> Point2i;
typedef Point2i Point;
typedef Point_<float> Point2f;
typedef Point_<double> Point2d;
The following operators are defined for points:
pt1 = pt2 + pt3;
pt1 = pt2 - pt3;
pt1 = pt2 * a;
pt1 = a * pt2;
pt1 = pt2 / a;
pt1 += pt2;
pt1 -= pt2;
pt1 *= a;
pt1 /= a;
double value = norm(pt); // L2 norm
pt1 == pt2;
pt1 != pt2;
推薦閱讀
- 同步:秩序如何從混沌中涌現
- 數據庫基礎教程(SQL Server平臺)
- Access 2016數據庫教程(微課版·第2版)
- Neural Network Programming with TensorFlow
- Enterprise Integration with WSO2 ESB
- iOS and OS X Network Programming Cookbook
- 基于Apache CXF構建SOA應用
- 企業級數據與AI項目成功之道
- 數據庫設計與應用(SQL Server 2014)(第二版)
- Python數據分析與數據化運營
- Solaris操作系統原理實驗教程
- 聯動Oracle:設計思想、架構實現與AWR報告
- 大數據技術原理與應用:概念、存儲、處理、分析與應用
- 數據應用工程:方法論與實踐
- 數字化轉型方法論:落地路徑與數據中臺