- Building Computer Vision Projects with OpenCV 4 and C++
- David Millán Escrivá Prateek Joshi Vinícius G. Mendon?a Roy Shilkrot
- 139字
- 2021-07-02 12:28:33
Vec object type
Vec is a template class mainly for numerical vectors. We can define any type of vector and the number of components:
Vec<double,19> myVector;
We can also use any of the predefined types:
typedef Vec<uchar, 2> Vec2b; typedef Vec<uchar, 3> Vec3b; typedef Vec<uchar, 4> Vec4b; typedef Vec<short, 2> Vec2s; typedef Vec<short, 3> Vec3s; typedef Vec<short, 4> Vec4s; typedef Vec<int, 2> Vec2i; typedef Vec<int, 3> Vec3i; typedef Vec<int, 4> Vec4i; typedef Vec<float, 2> Vec2f; typedef Vec<float, 3> Vec3f; typedef Vec<float, 4> Vec4f; typedef Vec<float, 6> Vec6f; typedef Vec<double, 2> Vec2d; typedef Vec<double, 3> Vec3d; typedef Vec<double, 4> Vec4d; typedef Vec<double, 6> Vec6d;
All the following vector operations are also implemented:
v1 = v2 + v3
v1 = v2 - v3
v1 = v2 * scale
v1 = scale * v2
v1 = -v2
v1 += v2
v1 = v2 + v3
v1 = v2 - v3
v1 = v2 * scale
v1 = scale * v2
v1 = -v2
v1 += v2
Other augmenting operations implemented are the following:
v1 == v2, v1 != v2
norm(v1) (euclidean norm).
推薦閱讀
- 漫話大數(shù)據(jù)
- 大數(shù)據(jù)可視化
- 大數(shù)據(jù):規(guī)劃、實(shí)施、運(yùn)維
- 數(shù)據(jù)革命:大數(shù)據(jù)價(jià)值實(shí)現(xiàn)方法、技術(shù)與案例
- 大數(shù)據(jù)架構(gòu)和算法實(shí)現(xiàn)之路:電商系統(tǒng)的技術(shù)實(shí)戰(zhàn)
- 數(shù)據(jù)挖掘原理與SPSS Clementine應(yīng)用寶典
- 網(wǎng)站數(shù)據(jù)庫技術(shù)
- Oracle RAC日記
- 智慧的云計(jì)算
- 企業(yè)大數(shù)據(jù)處理:Spark、Druid、Flume與Kafka應(yīng)用實(shí)踐
- Oracle 內(nèi)核技術(shù)揭密
- 基于數(shù)據(jù)發(fā)布的隱私保護(hù)模型研究
- MySQL性能調(diào)優(yōu)與架構(gòu)設(shè)計(jì)
- Oracle 11g數(shù)據(jù)庫系統(tǒng)設(shè)計(jì)、開發(fā)、管理與應(yīng)用
- MySQL技術(shù)內(nèi)幕:InnoDB存儲(chǔ)引擎(第2版)