Hello. Here is an odd problem, and i would be grateful for any advice.
Code...
cv::Mat x1Tx2 = cv::Mat::zeros(2,2, CV_64FC1 ); cv::Mat UT = cv::Mat::zeros(2,2, CV_64FC1 ); cv::Mat V = cv::Mat::zeros(2,2, CV_64FC1 ); cv::Mat tempW = cv::Mat::zeros(2,2, CV_64FC1 ); cv::Mat VUT = cv::Mat::zeros(2,2, CV_64FC1 );
//Some code ...
cout << tempW.size() << " " << V.size() << "" << UT.size() << " " << VUT.size() << endl; cv::SVD::compute(x1Tx2, tempW, UT, V,CV_SVD_U_T); cout << tempW.size() << " " << V.size() << "" << UT.size() << " " << VUT.size() << endl;
Output [2 x 2] [2 x 2][2 x 2] [2 x 2] [1 x 2] [2 x 0][2 x 0] [2 x 2]
Clearly the SVD function has changed the size of the cv::Mat which results in unusable matrices with 0 size dimensions. Any clues?