Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

VideoCapture returns BGR images, so the type will be Vec3b.

The image type is a combination of depth and channels.

depth - the type of pixel's element
channels - the number of elements in pixel

For depth OpenCV uses constants:

CV_8U - unsigned char
CV_8S - signed char
CV_16U - unsigned short
CV_16S - signed short
CV_32S - int
CV_32F - float
CV_64F - double

So 3-channel 8-bit image will have CV_8UC3 type (CV_8U depth and 3 Channels).

You can use depth() function to know image depth and channels() function to know channels number.