1 | initial version |
opencv uses BGR pixel order, not rgb, as you assume.
so the correct conversion flag must be cv2.COLOR_BGR2GRAY
if you load an image as grayscale, using cv2.IMREAD_GRAYSCALE
, the internal conversion from libpng or libjpg will be used, so again results might differ.