- Building Computer Vision Projects with OpenCV 4 and C++
- David Millán Escrivá Prateek Joshi Vinícius G. Mendon?a Roy Shilkrot
- 116字
- 2021-07-02 12:28:33
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入門經典(第5版)
- 大數據可視化
- 深入淺出MySQL:數據庫開發(fā)、優(yōu)化與管理維護(第2版)
- Ceph源碼分析
- SQL優(yōu)化最佳實踐:構建高效率Oracle數據庫的方法與技巧
- Proxmox VE超融合集群實踐真?zhèn)?/a>
- 企業(yè)級容器云架構開發(fā)指南
- SQL Server深入詳解
- 改變未來的九大算法
- Spring Boot 2.0 Cookbook(Second Edition)
- 數據挖掘與機器學習-WEKA應用技術與實踐(第二版)
- 掌中寶:電腦綜合應用技巧
- Applying Math with Python
- 一本書講透數據治理:戰(zhàn)略、方法、工具與實踐
- 實用數據結構基礎(第四版)