is there any way to know in advance if an image used as an input to a system is in RGB or BGR format?
I am using opencv with java API and i would like to convert an input image into grayscale or Lab* color space, and in opencv you have to specify first whether the image you want to convert is in RGB or BGR.
update:
the type of the image i am using is either .jpg or png