Closed ai-manthan closed 8 years ago
Hi
It probably means fewer (or no) points are found for the SVD operation. May be you could try checking the number of points in the matrix before calling the cvSVD function. For me it works fine, so may be it has to do with the specific version of OpenCV that you are using.
Regards.
On Wed, Oct 12, 2016 at 9:52 AM, vikasranga notifications@github.com wrote:
Hi, I processed the code from run.sh. It processed for few images and threw error after that. Following is the error:
OpenCV Error: Assertion failed (w.type() == type && (w.size() == cv::Size(nm,1) || w.size() == cv::Size(1, nm) || w.size() == cv::Size(nm, nm) || w.size() == cv::Size(n, m))) in cvSVD, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/lapack.cpp, line 1746 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/lapack.cpp:1746: error: (-215) w.type() == type && (w.size() == cv::Size(nm,1) || w.size() == cv::Size(1, nm) || w.size() == cv::Size(nm, nm) || w.size() == cv::Size(n, m)) in function cvSVD
I am attaching the snapshot of terminal also. [image: lane_detection_error] https://cloud.githubusercontent.com/assets/8520517/19300174/726a4a76-9076-11e6-9939-69ccdbfe3d0b.png
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mohamedadaly/caltech-lane-detection/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUcfyzX4141KKiMFobed1KRf9vrZhp6ks5qzIO_gaJpZM4KUbJP .
Hi @mohamedadaly, Thanks to reply! I will check it. Can you tell which version of OpenCV you are using? I am using OpenCV 2.4.8.
Thanks Vikas
Can you send me the command line that generates this error?
'bash run.sh' gave error. run.sh called main.cc, main.cc called mcvGetLanes function which gave error at cvSVD function. I already posted the error in first comment along with snapshot. Hope it helps!
It is working for me. I have OpenCV 2.4.9.
$ pkg-config --modversion opencv
2.4.9`
Hi @mohamedadaly,
It worked.
We inserted three lines just after line no. 3197, and commented two lines just before line no. 3197 in LaneDetector.cc. Following are the details:
line no. 3197:
CvMat *cpointst = cvCreateMat(cpoints->cols, cpoints->rows, CV_32FC1);
Three lines inserted just after line no. 3197:
int m = cpointst->rows, n = cpointst->cols, nm = std::min(m, n);
CvMat *W = cvCreateMat(nm, 1, CV_32FC1);
CvMat *V = cvCreateMat(2, 2, CV_32FC1);
Two lines commented just before line no. 3197:
// CvMat *W = cvCreateMat(2, 1, CV_32FC1);
// CvMat *V = cvCreateMat(2, 2, CV_32FC1);
Hi @mohamedadaly, Thanks for providing the source code. I processed the code. It processed for few images and threw error after that. Following is the error:
I am attaching the snapshot of terminal also.