I am using Python (2.7) and bindings for OpenCV 2.4.6 on Ubuntu 12.04
I load an image
image = cv2.imread(\'image.jpg\')
I then chec
In openCV reading jpg images result 3 channel images by default. So i'm not sure if you can actually see from jpg file that it's already grayscaled but you can always load it as grayscaled. It would bring problems only if the image isn't grayscaled beforehand and for your case i believe that it wouldn't work. So short answer: you cant save jpg as onechanneled image. So you would need to grayscale it again after reading or figure out new way determine if image is grayscaled or not.