OpenCV异常提示:npoints2和npoints3必须大于等于零在fitLine函数中使用
发布时间
阅读量:
阅读量
这个是fitline函数中的错误提示, 当然其他函数也可能出现类似的错误提示
哪里出了问题呢? 我们来试试看看fitLine源码吧, 源码在下面
void cv::fitLine( InputArray _points, OutputArray _line, int distType, double param, double reps, double aeps )
{
Mat points = _points.getMat();
float linebuf[6]={0.f};
int npoints2 = points.checkVector(2, -1, false);
int npoints3 = points.checkVector(3, -1, false);
CV_Assert( npoints2 >= 0 || npoints3 >= 0 );
if( points.depth() != CV_32F || !points.isContinuous() )
{
全部评论 (0)
还没有任何评论哟~
