1 | initial version |
The imread()
functions allocates a new Mat
, so the code should be like:
Mat cokeBGR = Highgui.imread("/mnt/sdcard/coke.bmp");
Mat cokeRGBA = new Mat();
Imgproc.cvtColor(cokeBGR, cokeRGBA, Imgproc.COLOR_BGR2RGBA);
Imgproc.resize(cokeRGBA, sm, sm.size());