GoogleAds - Half Banner


Inverse stereo triangulation (based on Caltech toolbox)


Alvin6688 - Posted on 26 December 2011

Hello everyone,

I am trying to invert the stereo triangulation operation found in the CalTech camera calibration toolbox (http://www.vision.caltech.edu/bouguetj/calib_doc/); given 3D world coordinates, I need to find the corresponding 2D image coordinates.

The problem is that the algorithms (2D image --> 3D world) employ a significant amount of inner product algebra, and I've been unable to decompose these steps when going in the inverse direction (3D world --> 2D image). My question to anyone who has experience with this: Is this an ill-posed problem (i.e. finding inverse of dot product leads to an infinite number of solutions)? If so, is there a work-around?

Thank you in advance for your time,

Alvin Chen

% --- Known inputs from calibration:
om: 3D rotation matrix (extrinsic parameter)
T: translation matrix (extrinsic parameter)
R: R = rodrigues(om)
xt: normalized left image coordinate
xtt: normalized right image coordinate

% --- Stereo triangulation
u = R * xt;

n_xt2 = dot(xt,xt);
n_xtt2 = dot(xtt,xtt);

T_vect = repmat(T, [1 N]);

DD = n_xt2 .* n_xtt2 - dot(u,xtt).^2;

dot_uT = dot(u,T_vect);
dot_xttT = dot(xtt,T_vect);
dot_xttu = dot(u,xtt);

NN1 = dot_xttu.*dot_xttT - n_xtt2 .* dot_uT;
NN2 = n_xt2.*dot_xttT - dot_uT.*dot_xttu;

Zt = NN1./DD;
Ztt = NN2./DD;

X1 = xt .* repmat(Zt,[3 1]);
X2 = R'*(xtt.*repmat(Ztt,[3,1]) - T_vect);

% --- Left world coordinates:
XL = 1/2 * (X1 + X2);

% --- Right worldcoordinates:
XR = R*XL + T_vect;