I am using SVD function to get values. In my Opencv, I wrote
Mat w, u, vt;
SVD::compute(A, w, u, vt);
After compare the values against the MATLAB, it seems u and vt matrix does not match with what the MATLAB returns. The values actually match, but sometime, U(:1), and VT(:1) is negated from what OpenCV returns. Sometime, VT elements are negated and flipped. Although U*VT returns same value as MATLAB, U and VT itself is different than MATLAB (randomly) and I am not sure what is causing this. I am using OpenCV 2.4 and can you help me on how to solve this?
Thanks.