Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

findCirclesGridDefault doesn't work on Android

Is there some bug in the OpenCV android library that is making this function crash? I keep getting this error:

04-09 18:24:25.426: E/cv::error()(26254): OpenCV Error: Unsupported format or combination of formats ([Start]FindContours support only 8uC1 and 32sC1 images) in _CvContourScanner* cvStartFindContours(void*, CvMemStorage*, int, int, int, CvPoint), file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/contours.cpp, line 196
04-09 18:24:25.426: E/org.opencv.calib3d(26254): calib3d::findCirclesGridDefault_10() caught cv::Exception: /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/contours.cpp:196: error: (-210) [Start]FindContours support only 8uC1 and 32sC1 images in function _CvContourScanner* cvStartFindContours(void*, CvMemStorage*, int, int, int, CvPoint)

The line that it fails on in the code is this:

mPatternWasFound = Calib3d.findCirclesGridDefault(grayFrame, mPatternSize,
                mCorners, Calib3d.CALIB_CB_ASYMMETRIC_GRID);

I'm using OpenCV library 2.4.10

findCirclesGridDefault doesn't work on Android

Is there some bug in the OpenCV android library that is making this function crash? I keep getting this error:

04-09 18:24:25.426: E/cv::error()(26254): 19:31:11.094: E/cv::error()(32451): OpenCV Error: Unsupported format or combination of formats ([Start]FindContours support (Blob detector only 8uC1 and 32sC1 images) supports 8-bit images!) in _CvContourScanner* cvStartFindContours(void*, CvMemStorage*, int, int, int, CvPoint), virtual void cv::SimpleBlobDetector::detectImpl(const cv::Mat&, std::vector<cv::KeyPoint>&, const cv::Mat&) const, file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/contours.cpp, /hdd2/buildbot/slaves/slave_ardbeg1/50-SDK/opencv/modules/features2d/src/blobdetector.cpp, line 196
286
04-09 18:24:25.426: E/org.opencv.calib3d(26254): calib3d::findCirclesGridDefault_10() 19:31:11.094: E/org.opencv.calib3d(32451): calib3d::findCirclesGridDefault_11() caught cv::Exception: /home/reports/ci/slave_desktop/50-SDK/opencv/modules/imgproc/src/contours.cpp:196: /hdd2/buildbot/slaves/slave_ardbeg1/50-SDK/opencv/modules/features2d/src/blobdetector.cpp:286: error: (-210) [Start]FindContours support Blob detector only 8uC1 and 32sC1 images supports 8-bit images! in function _CvContourScanner* cvStartFindContours(void*, CvMemStorage*, int, int, int, CvPoint)
virtual void cv::SimpleBlobDetector::detectImpl(const cv::Mat&, std::vector<cv::KeyPoint>&, const cv::Mat&) const

The line that it fails on in the code is this:

mPatternWasFound = Calib3d.findCirclesGridDefault(grayFrame, mPatternSize,
                mCorners, Calib3d.CALIB_CB_ASYMMETRIC_GRID);

I'm using OpenCV library 2.4.102.4.11