file /home/tau/opencv/opencv-3.1.0/modules/imgproc/src/linefit.cpp, line 603
terminate called after throwing an instance of 'cv::Exception'
what(): /home/tau/opencv/opencv-3.1.0/modules/imgproc/src/linefit.cpp:603:
error: (-215) npoints2 >= 0 || npoints3 >= 0 in function 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);