Menu

#8 application aborted while matching

v1.0
open
None
5
2014-06-26
2014-06-20
Kriti Sood
No

Thanks to your bugs support, my application compiled successfully. But on clicking on start matching button, my application aborted showing this error:

matching{}OpenCV Error: Assertion failed (src.depth() == dst.depth() && src.size == dst.size) in cvCopy, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/copy.cpp, line 558
terminate called after throwing an instance of 'cv::Exception'
what(): /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/copy.cpp:558: error: (-215) src.depth() == dst.depth() && src.size == dst.size in function cvCopy

Aborted

After googling it, i found its fix.
We need to make changes in the tool_matching.cpp file line 390
CvMat * status = cvCreateMat(1, correspondences, CV_8S);
by changing cv_8S attribute to 8UC1 i.e
CvMat * status = cvCreateMat(1, correspondences, CV_8UC1);

same changes were done in tool_calibration.cpp file line 260
CvMat * F = opencv_create_matrix(3, 3), * status = cvCreateMat(1, points1->cols, CV_8S);
i.e changing it to
CvMat * F = opencv_create_matrix(3, 3), * status = cvCreateMat(1, points1->cols, CV_8UC1);

The last error encountered is
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

which i dubugged by appending code in mvg_decomposition.cpp file
add the following line
int m = P->rows, n = P->cols, nm = std::min(m, n);
and change the code CvMat * W = cvCreateMat(4, 1, CV_64F) to
CvMat * W = cvCreateMat(nm, 1, CV_64F)

and Remake the files.

This had led to successful running of my application and thus wished to share the changes.
I hope this helps.
cheers

Discussion

  • TJ

    TJ - 2014-06-25

    Hi Kriti,

    as I'm no longer maintaining this project. But as it looks like you are interested in this project I've just added you as Admin to this project. You now have all rights to commit your patch to GIT. Please feel free to update the version number, create a new release, ...

    Regards
    Tobias

     
  • TJ

    TJ - 2014-06-25
    • assigned_to: Kriti Sood
     
  • TJ

    TJ - 2014-06-25

    You can now even close this bug, if you committed this code to GIT. :)

     
  • Kriti Sood

    Kriti Sood - 2014-06-26

    Sure i would heed that. Thanx for the support. :)

     

Log in to post a comment.

MongoDB Logo MongoDB