How To Get Mat With A Drawable Input In Android Using Opencv
I have some image files in the drawable folder. And now, I want to convert them into opencv Mat object. I've found a function: Mat img = Highgui.imread(inFile); which is reading a
Solution 1:
This should do
Mat img = Utils.loadResource(context, refrenceimgID, Highgui.CV_LOAD_IMAGE_COLOR);
Imgproc.cvtColor(img, gryimg, Imgproc.COLOR_RGB2BGRA);
Post a Comment for "How To Get Mat With A Drawable Input In Android Using Opencv"