I am trying to triangulate some points with opencv and I found this cv::triangulatePoints()
function, but there is no much information about it.
I've read I need the camera matrices, but I don't know how can I get it.
I need the triangulation to choose the right rotation and translation matrix, so I can't calculate the camera matrix as C=K*[R|t]
because I don't know which R
and t
matrices are the good ones.
The difference between my question and this one is that they know their camera matrices and R
and t
matrices, buy I don't know mines.
esencial=Kt*fundamental*K;
SVD descomp = SVD(esencial);
Mat U=descomp.u;
Mat Vt=descomp.vt;
Mat D=(Mat_<int>(3,3) << 1,0,0,0,1,0,0,0,0);
Mat nueva_E = U*D*Vt ;
descomp = SVD(nueva_E);
U=descomp.u;
Vt=descomp.vt;
Mat R1; //dos posibles rotaciones
Mat R2;
Mat t1; //dos posibles traslaciones
Mat t2;
Mat W = (Mat_<int>(3,3) << 0,-1,0,1,0,0, 0,0,1);
Mat Z= (Mat_<int>(3,3)<<0,1,0,-1,0,0, 0,0,1);
R1 = U * Mat(W) * Vt;
R2 = U * Mat(Z) * Vt;
t1 = U.col(2); //u3
t2 = -U.col(2); //-u3
Now I thing I need the triangulation to choose one R
and one t
matrix