I am trying to understand equation 26 given equation 25.

enter image description here

I know that generally, if we have an overdetermined system of linear equations of the form

$Ax = b$

the least squares solution is

$\hat{x} = (A^TA)^{-1}A^Tb$

Applying it to the above equation of

$D [R|t] = C$

where $[R|t]$ is the unknown matrix, we get

$\hat{[R|t]} = (D^TD)^{-1}D^TC$

but that's not exactly what's shown in equation 26. How did (26) come from (25) if they are "solving linearly"?

K is a 3x3 “camera matrix”, R is a 3x3 rotation matrix, and t is a 3x1 translation vector


  • $\begingroup$ Can you define what $K$, $R$, and $t$ are? $\endgroup$ – Wolfy Dec 20 '18 at 6:34
  • $\begingroup$ Yes, sorry. K is a 3x3 “camera matrix”, R is a 3x3 rotation matrix, and t is a 3x1 translation vector $\endgroup$ – Carpetfizz Dec 20 '18 at 6:35
  • $\begingroup$ Okay, please edit your question, so other people know as well :). $\endgroup$ – Wolfy Dec 20 '18 at 6:36
  • $\begingroup$ These are two forms of the pseudo inverse matrix. We select one or the other depending on the dimensions of $D$, when $D$ is not square. When $D$ is square and full rank, no difference. An easy demonstration if $D$ is square: consider SVD ... $\endgroup$ – Damien Dec 20 '18 at 9:12
  • $\begingroup$ A precision: if $D$ is not square, one of the two forms is invalid ... $\endgroup$ – Damien Dec 20 '18 at 9:15

In fact, equation 25 is $ [R|t] D = C$ and not $D [R|t] = C$ , and indeed $ [R|t] DD^T = CD^T$ , yielding $\hat{[R|t]}= CD^T*(DD^T)^{-1}$

  • $\begingroup$ How did you get the second and third expressions? I know they match the text in the OP, but are you actually applying the least squares equation to get to it? $\endgroup$ – Carpetfizz Dec 20 '18 at 8:31
  • $\begingroup$ I start from $[R|t]D=C$ and just right multiply by $D^T$ . The least squares is valid in exactly the same way, just consider $x^T A=b^T$ in your original definition. $\endgroup$ – user617446 Dec 20 '18 at 9:53
  • $\begingroup$ Thank you, do you mind pointing me to a reference that talks about how to solve $x^TA = b^T$? Does the proof work the same way as the proof for solving $Ax = b$ ? $\endgroup$ – Carpetfizz Dec 21 '18 at 1:32
  • $\begingroup$ Also, did you mean "consider $x^TA^T = b^T$ ? $\endgroup$ – Carpetfizz Dec 21 '18 at 2:11
  • 1
    $\begingroup$ The proof works the same way, since $x^T A-b^T = (A^T x-b)^T$ and the object to minimize, the norm squared, is the same. $\endgroup$ – user617446 Dec 23 '18 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.