January 2016
Intermediate to advanced
296 pages
5h 59m
English
We have learned about the Mat and Vec3b classes, but we need to learn about other classes as well.
In this section, we will learn about the most basic object types required in most of the projects:
VecScalarPointSizeRectRotatedRect
vec is a template class that is used mainly for numerical vectors. We can define any type of vectors and a number of components:
Vec<double,19> myVector;
Or we can 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 ...