I\'m loading a 24 Bit RGB image from a PNG file into my OpenCV application.
However loading the image as grayscale directly using imread
gives a very po
The simple answer is, that openCV functions uses the BGR format. If you read in a image with imread
or VideoCapture
, it'll be always BGR. If you use RGB2GRAY, you interchange the blue channel with the green. The formula to get the brightness is
y = 0.587*green + 0.299*red + 0.114*blue
so if you change green and blue, this will cause an huge calculation error.
Greets