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?
NO.
I see two solutions to this:
Mat1b
) and a rgb ( Mat3b
) image, and work on the image you need. 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.