Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'll reply to myself because I've done some very stupid errors. In the second part of the code I wrote:

 cv::Mat U_OpenCV(U_row, U_cols, CV_64FC1, svd.matrixU().data());

while the correct code should be:

 cv::Mat U_OpenCV = cv::Mat(U_row, U_cols, CV_64FC1, svd.matrixU().data());

So the error was as @berak underlined in the first part, sorry I didn't get it at first sight.

While in the second, checking better the error of the compiler, since I called cv2eigen I should provide more template arguments. At the end I didn't used this method, I just used Eigen and then compared the values of both one by one and I solved my problem, without the need of the function. For small matrix using a loop can do the trick, is not a big problem afterall move 9 variables (in my case).

I'll reply to myself because I've done some very stupid errors. In the second part of the code I wrote:

 cv::Mat U_OpenCV(U_row, U_cols, CV_64FC1, svd.matrixU().data());

while the correct code should be:

 cv::Mat U_OpenCV = cv::Mat(U_row, U_cols, CV_64FC1, svd.matrixU().data());

So the error was as @berak underlined in the first part, sorry I didn't get it at first sight.

While in the second, checking (I checked better the error of the compiler, compiler) since I called cv2eigen I should provide more template arguments. At the end I didn't used this method, I just used Eigen and then compared the values of both one by one and I solved my problem, without the need of the function. For small matrix using a loop can do the trick, is not a big problem afterall move 9 variables (in my case).