I need to be able to work with images where some regions are grayscale while others are kept on the RGB format. I don't want to convert an image into a grayscale since it will lose the channels and will become simply one channeled, is there a way to keep the RGB channels of some pixels on the picture and turn the others into a grayscale?
Asked
Active
Viewed 729 times
1 Answers
5
NO.
I see two solutions to this:
- Have both a gray (
Mat1b
) and a rgb (Mat3b
) image, and work on the image you need. - Have a single rgb (
Mat3b
) image, and set r,g,b channels to the same gray value where you need. In this way you can mimic to have a mixed gray/rgb image.

Miki
- 40,887
- 13
- 123
- 202