There are several things you need to think about before going ahead with color channels:
- OpenCV uses BGR color channels and not RGB color channels! This is an important difference when switching between color channels.
- You are using the scalar color to define the values of your text. However you are assuming that it is RGB color space, but it is actually the BGR color space.
- Also it is normal that YUV color space, can result in different colors then BGR depending on the values. B value =/= Y value, G value =/= U value, ... Keep this in mind!