After additional extensive research, I have further narrowed down the source of all this confusion surrounding BayerRG → RGB conversion. And that source is this:
What the rest of world, including:
- MATLAB: see link in my previous message
- Camera manufacturer Basler: Bayer to RGB and missed pixel value at last row and line
consider as Bayer RG (aka RGGB), OpenCV considers as BayerBG (aka BGGR): OpenCV: Color conversions
Specifically, the rest of the world uses the top left 2x2 sub-matrix of the CFA (Color Filter Array) to name the Bayer pattern. OpenCV, on the other hand, uses the 2x2 sub-matrix that starts at the 2nd row and 2nd column of the CFA.
Does anyone know why OpenCV deviates from the rest of the world in this way in naming the Bayer patterns?