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;
推薦閱讀
- Hands-On Machine Learning with Microsoft Excel 2019
- SQL Server 2008數(shù)據(jù)庫應(yīng)用技術(shù)(第二版)
- 文本數(shù)據(jù)挖掘:基于R語言
- 數(shù)據(jù)庫開發(fā)實(shí)踐案例
- 數(shù)據(jù)要素五論:信息、權(quán)屬、價(jià)值、安全、交易
- Mockito Cookbook
- 數(shù)字IC設(shè)計(jì)入門(微課視頻版)
- 云計(jì)算寶典:技術(shù)與實(shí)踐
- 中國云存儲發(fā)展報(bào)告
- 改進(jìn)的群智能算法及其應(yīng)用
- ECharts數(shù)據(jù)可視化:入門、實(shí)戰(zhàn)與進(jìn)階
- Scratch Cookbook
- AutoCAD基礎(chǔ)與應(yīng)用精品教程(2008版)
- 信息技術(shù)導(dǎo)論
- 大數(shù)據(jù)處理之道