I use OpenCV 2.4.0 on Android and try to find contours in a binary imgage.
List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
Mat mIntermediateMat = new Mat();
Imgproc.Canny(img, mIntermediateMat, 50, 100);
Imgproc.findContours(mIntermediateMat, contours, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE);
But the function throws a "Unrecognized or unsupported array type in function CvMat..." exception.
Also i try this Mat as input:
Mat mIntermediateMat = new Mat(height, width, CvType.CV_8UC1, new Scalar(0));
But i get the same exception.