In this section, the basics of popular color spaces will be covered. These color spaces are—RGB, CIE L*a*b*, HSL and HSV, and YCbCr.
OpenCV provides more than 150 color-space conversion methods to perform the user's required conversions. In the following example, the conversions are performed from an image loaded in the RGB (BGR in OpenCV) to the other color spaces (for example, HSV, HLS, or YCbCr).