1 | initial version |
you can convert it to a Bitmap, and draw it to an ImageView:
public void helloworld() {
// make a mat and draw something
Mat m = Mat.zeros(100,400, CvType.CV_8UC3);
Core.putText(m, "hi there ;)", new Point(30,80),
Core.FONT_HERSHEY_SCRIPT_SIMPLEX, 2.2, new Scalar(200,200,0),2);
// convert to bitmap:
Bitmap bm = Bitmap.createBitmap(m.cols(), m.rows(),Bitmap.Config.ARGB_8888);
Utils.matToBitmap(m, bm);
// find the imageview and draw it!
ImageView iv = (ImageView) findViewById(R.id.imageView1);
iv.setImageBitmap(bm);
}