Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Imread in Android OpenCV shows an image with too much blue colour

I'm making a modification of image-manipulations sample. I have created an option to load an image from the internal memory of the device. I use the imread function. It shows me pictures with too much blue colour all the time. Here's the code:

case ImageManipulationsActivity.VIEW_MODE_READIMG:
        mRgba = Highgui.imread("/mnt/sdcard/download/02.jpg");

For example an object on the image should be red, but appears blue. When I add the flag "CV_LOAD_IMAGE_COLOR", the image appears in grayscale. The same problem appears in OpenCV 2.4.2 and in the version. The image, which I'm loading is in full color. How can I display it properly?