Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The way you access thelements. cv::Vec3f is a vector of 3 float elements and hence belongs to the class Vector. You access each element by dereferencing the index.

Point3f is more intuitive, because you access the elements using a struct that is made of 3 floats. So the first element is accessed using point.x, the second is accessed using point.y and the third by point.z. The Point class also gives access to other coordinate related stuffs such as cross and dot product.

The class vector where in is primarily used to store and access data.

I am not sure, about the speed difference between the two. But as an end user, Point makes life pretty simple.