Mat b = new Mat(); Bitmap bmp = getIntent().getExtras().getParcelable(\"image_send\"); @Override protected void onCreate(Bundle savedInstanceState) { super.onCr
Mat tmp = new Mat (bmp.getWidth(), bmp.getHeight(), CvType.CV_8UC1);
OpenCV Mat constructor expects rows, cols pair instead of width, height as its arguments, invert them.
Try:
Mat tmp = new Mat (bmp.getHeight(), bmp.getWidth(), CvType.CV_8UC1);