I tried reading an image from drawable folder. I am using eclipse ide. I ran the below code but the image was not loaded. The code is taken from here
Mat image = new Mat(new Size(500,500 ),CvType.CV_8U);// Change CvType as you need.
image = Highgui.imread("icon.png");
if(image.empty()) {
Log.i(TAG, "Empty image!");
}
My
Screenshot of my drawable folder is below :

How can I load this image?
getResources().openRawResource(R.drawable.icon). Or maybe Highgui can read from resources?imread()of course. That's why i asked youPlease tell if Highgui has a method to read from an inputstream.. So why didn't you answer my question? You can easily get a list of all available functions for Highgui in the IDE.imread()function. There is no another function for this.