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.
Vec4i is a structure for representing a vector with 4 dimensions, with each value an int. If you look at the HoughLinesP() documentation you'll see what each dimension in is in this particular case: lines – Output vector of lines.
so CV_8UC3 is an 8-bit unsigned integer matrix/image with 3 channels. Although it is most common that this means an RGB (or actually BGR) image, it does not mandate it. It simply means that there are three channels, and how you use them is up to you and your application.
A Scalar is a. Template class for a 4-element vector derived from Vec. Being derived from Vec<Tp, 4> , Scalar and Scalar can be used just as typical 4-element vectors. The type Scalar is widely used in OpenCV to pass pixel values.
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.
vec3b
is defined as 3 uchars vec: From OpenCV documentation:
typedef Vec<uchar, 3> Vec3b;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With