I am using Java openCV, and i try to load a photo and run the template matching over it. The template matching method deals with Mat objects, so i need to load the images an
You need to convert your bitmap to the RGBA format:
Bitmap bmp32 = i.copy(Bitmap.Config.ARGB_8888, true);
Actually it is the most discussed problem on Android-OpenCV user-group: https://groups.google.com/group/android-opencv/
The fix for this problem is already available in OpenCV trunk and will be included into the next release of OpenCV.
Also you can read image using the OpenCV API:
Mat image = Highgui.imread("/sdcard/TVguide/Detection/detected.jpg");
loading using OpenCV is quicker (20%-40%) than loading using BitmapFactory and transforming to OpenCV Mat
Mat image = Highgui.imread("/sdcard/TVguide/Detection/detected.jpg");