任何人都可以帮助我在 Android的OpenCV?我已经完成了以下代码。它适用于相同尺寸的图像,但我想要两个不同尺寸的图像
Bitmap bitmap_a1 = BitmapFactory.decodeResource(this.getResources(),
R.drawable.a1);
Bitmap bitmap_a2 = BitmapFactory.decodeResource(this.getResources(),
R.drawable.a2);
Mat mat_a1 = new Mat();
Mat mat_a2 = new Mat();
Mat mat_combine = new Mat();
Mat mat_cropped = new Mat();
int w = bitmap_a1.getWidth();
int h = bitmap_a1.getHeight();
bitmap_combine = Bitmap.createBitmap(w,h, Bitmap.Config.RGB_565);
Utils.bitmapToMat(bitmap_a1,mat_a1);
Utils.bitmapToMat(bitmap_a2,mat_a2);
Core.addWeighted(mat_a1,1,mat_a2,0.9,0.0,mat_combine);
Utils.matToBitmap(mat_combine,bitmap_combine);
iv_open.setImageBitmap(bitmap_combine);