This problem arose in my stereo vision project. $$ P_{1c} = A*P $$
$$ P_{2c} = B*P $$ where: $P_{1c}$ and $P_{2c}$ are $3\times1$ vectors, $A$ and $B$ are $3 \times 4$ matrices and $P$ is a $4\times1$ vector.
Or, more verbosely:
$$ \left( \begin{array}{ccc} a_1 \\ b_1 \\ w_1 \end{array} \right) = \left( \begin{array}{ccc} A_{11} & A_{12} & A_{13} & A_{14} \\ A_{21} & A_{22} & A_{23} & A_{24} \\ A_{31} & A_{32} & A_{33} & A_{34} \\ \end{array} \right) * \left( \begin{array}{ccc} X \\ Y \\ Z \\ 1 \\ \end{array} \right) $$
$$ \left( \begin{array}{ccc} a_2 \\ b_2 \\ w_2 \end{array} \right) = \left( \begin{array}{ccc} B_{11} & B_{12} & B_{13} & B_{14} \\ B_{21} & B_{22} & B_{23} & B_{24} \\ B_{31} & B_{32} & B_{33} & B_{34} \\ \end{array} \right) * \left( \begin{array}{ccc} X \\ Y \\ Z \\ 1 \\ \end{array} \right) $$ $P_{1c}, P_{2c}, A$ and $B$ are known, find $P$.
An explicit solution is a nice start, and in fact I already have it:
(Explicit Solution - page 6)
but from the nature of the problem, I can tell that it will not always be possible to find $P$ using the explicit solution (since I only have estimates for $P_{1c},P_{2c},A$ and $B$), so I was trying to tackle the problem like this:
$f(P) = (A*P-P_{1c})^2+(B*P-P_{2c})^2$
Minimize $f(P)$ with respect to $P$.
I believe this notation is not as rigorous as one would expect, since $P$ is a vector. So, to put it in another way:
Knowing $P_{1c},P_{2c},A$ and $B$, find the vector $P$ wich gives the "best-fit" to $$ P_{1c} = A*P $$
$$ P_{2c} = B*P $$ (in a least squares sense).
Any help would be great, and please feel free to approach this problem with a different strategy than the one I'm trying, but I would appreciate if someone could answer this without "opening up" the matrices (instead of using the $A_{ij}$'s and working out with the explicit equations, only use the matrices, and matrix operations like $A^T, A^{-1}$), if that's even possible.
Hope I made myself clear, thank's in advance!