Difference between COLOR_RGBA2RGB and COLOR_RGBA2BGR

Hi there,
I have an 8BitBGRA and have to remove the alpha channel. There are two possibilites: COLOR_RGBA2RGB and COLOR_RGBA2BGR. I need to evaluate the converted signal with OpenCV (read the pixel data). So I use it for further processes. I know that OpenCv uses BGR, so I think COLOR_RGBA2BGR is the right choice? Or does it not matter?

It depends on what you are doing with the data next. For example if you are going to display it in a GUI you might want it in RGB format, but if you are only going to manipulate it within OpenCV it’s probably best to have it in BGR format.

1 Like