Hi friends,
vector types also exist for 2-element and 4-element vectors (cv::Vec2b and
cv::Vec4b) and for other element types. In this later case, the last letter is replaced by s
for short, i for int, f for float, and d for double. All of these types are defined using the
template class cv::Vec<t,n> where T is the type and N is the number of vector elements.
Being derived from Vec<_Tp, 4> , Scalar_ and Scalar can be used just as typical 4-element vectors. In addition, they can be converted to/from CvScalar . The type Scalar is widely used in OpenCV to pass pixel values.
Thus Scalar does not literally mean Vector.
Hope this helps you :)
nice question, waiting big_karma_guys )
I use mostly opencv android but I think Scalar appears in the same situations. The usage of Scalar there looks more like a tuple, usually with 3 or 4 elements.