我使用2.4.3版本的OpenCV,并试图用“findContours”功能Canny边缘检测这样的后:OpenCV的:findContours功能错误
struct Component
{
cv::Rect boundingBox;
double area;
double circularity;
}
cv::vector <Component> components;
cv::vector <cv::Vec4i> hierarchy;
cv::findContours (cannyEdges, components, hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_NONE);
然后,它抛出了一行行的错误“CV :: findContours”像这样:
OpenCV Error: Assertion failed (mtype == type0 || (CV_MAT_CN(mtype) == CV_MAT_CN(type0) && ((1((type0) & fixedDepthMask) != 0)) in unknown function, file ...\opencv\modeuls\core\src\matrix.cpp, line 1421
我怎样才能解决这个问题?
我们不能用你给我们重现错误。请提供[简短,独立,正确(可编译),示例](http://sscce.org/)。 – karlphillip
@karlphillip:该链接为+1 –