java - Trouble converting mat to bitmap? -


i using opencv detect similarities between 2 images. unfortunately, line of code converts mat bitmap causing app crash. have ideas causing this? here code:

    bitmap centerbit = bitmapfactory.decoderesource(getresources(), r.drawable.center);     mat center = new mat();     utils.bitmaptomat(centerbit,center);     mat resultcenter = new mat();     imgproc.matchtemplate(center,center,resultcenter,imgproc.tm_sqdiff_normed);     bitmap bm = bitmap.createbitmap(resultcenter.cols(), resultcenter.rows(),bitmap.config.argb_8888);     utils.mattobitmap(resultcenter, bm); //this line causing app crash     imageview iv = (imageview) findviewbyid(r.id.imageview);     iv.setimagebitmap(bm); 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -