Re: [OpenCV4Android] OpenCV on Android findContours throws Exception

246 views
Skip to first unread message

nedaa fadhel

unread,
Sep 24, 2012, 1:45:41 PM9/24/12
to android...@googlegroups.com
Dear Heman,
 i am trying to learn image processing in andriod emulator for my project,can you help me how to read a image and use edge detection on it , i really appricate your help .
thanks a lot.
best regards,
nedaa

On Thu, Sep 20, 2012 at 1:12 PM, Heman <m.sc.chris...@googlemail.com> wrote:

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.

--
 
 
 

Reply all
Reply to author
Forward
0 new messages