软件: android studio3.5
Mat im = Imgcodecs.imread(imPath, Imgcodecs.IMREAD_GRAYSCALE);
if(im.empty())
tips += "Empty image... \n";
else
{
……
}
这是为什么啊? 难道只能通过
Bitmap bitmap = BitmapFactory.decodeResource(MainActivity.this.getResources(),R.drawable.girl);
Mat mat = new Mat();
Utils.bitmapToMat(bitmap,mat);
这种方式才能正常读图吗?
我还想再读取一个本地的pb文件呢,就是读不对啊,请求指点