1 | initial version |
imread does not return null on failure, but an empty() Mat (without any pixels)
so please check: if(imgRGB.empty())
instead of if(imgRGB==null)
also, it cannot read files from the apk(zip). if you want to do that, please use loadResource
2 | No.2 Revision |
imread does not return null on failure, but an empty() Mat (without any pixels)
so please check: if(imgRGB.empty())
instead of if(imgRGB==null)
also, it cannot read files from the apk(zip). if you want to do that, please use loadResource
then, to load i flie from sdcard (using imread) please rater use Environment.getExternalStorageDirectory().getPath() + "/my.png"