Reputation: 48956
I came across the type Vec3b
in OpenCV
. I just couldn't find a description if this type and why we use it.
Do you know of any reference that describes such type, or, if you can clarify it this would be very much appreciated.
Thanks.
Upvotes: 23
Views: 37964
Reputation: 20136
vec3b
is defined as 3 uchars vec: From OpenCV documentation:
typedef Vec<uchar, 3> Vec3b;
Upvotes: 8
Reputation: 20160
Vec3b is the abbreviation for "vector with 3 byte entries"
Here those byte entries are unsigned char values to represent values between 0 .. 255.
Each byte typically represents the intensity of a single color channel, so on default, Vec3b is a single RGB (or better BGR) pixel. So Vec3bVar[0] might be the blue color part, [1] green and [2] red.
But it could be any other 24 bit 3 channel pixel value like HSV.
Upvotes: 33