今天在树莓派上运行程序,调用了HoughlinesP函数,首先创建了一个
vector<Vec4f>
的容器来存储检测到的直线。
运行程序,报错:
begin houghlinesP
OpenCV Error: Assertion failed (mtype == type0 || (CV_MAT_CN(mtype) ==
CV_MAT_CN(type0) && ((1 << type0) & fixedDepthMask) != 0)) in create, file
/build/opencv-U1UwfN/opencv-2.4.9.1+dfsg1/modules/core/src/matrix.cpp, line 1486
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-U1UwfN/opencv-2.4.9.1+dfsg1/modules/core/src/matrix.cpp:
1486: error: (-215) mtype == type0 || (CV_MAT_CN(mtype) == CV_MAT_CN(type0)
&& ((1 << type0) & fixedDepthMask) != 0) in function create
已放弃
后来对错误进行定位,发现HoughlinesP出现了问题,后来改了存放检测到直线的容器vector<Vec4i>
就解决了问题,,不明所以,,,坑实在太多了、、、