std::vector<vector<Point> > contours;
std::vector<cv::Vec4i> hierarchy;
cv::findContours(mask1,contours,hierarchy,CV_RETR_EXTERNAL,CV_CHAIN_APPROX_NONE);
错误:matrix.cpp:2430: error: (-215) mtype == type0 || (CV_MAT_CN(mtype) == CV_MAT_CN(type0) && ((1 << type0) & fixedDepthMask) != 0) in function create
解决:std::vector<vector<Point> > contours 改成std::vector<std::vector<cv::Point>> contours;
网友评论