Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I convert a single channel monochrome image to 3 channel gray scale?

I want to use color to annotate a monochrome image.

As I understand it, first I need to convert the single channel monochrome image to a 3 channel gray scale image with BGR channels all set the same. Then I can overlay color annotations on the gray scale image.

It is the first part that has me stumped: It seems like .clone, .copyTo, cvtColor all force the output to the same number of channels as the input?

How do I create a 3 channel copy of a single channel image?