Find multiple transformation matrices

57 Views Asked by At

I'm trying to find points in space given some fixed view (or projection) of those points. For simplicity lets say we have 3 points, unknown locations, in a two dimensional space. We have 3 cameras which show the three points in 1 dimension. We don't know where the cameras are. How to find the points?

Example data:

View #1. Points at [-2, 0, 2]

View #2. Points at [-2, 1, 2]

View #3. Points at [-2, -1, 2]

(Views 2 and 3 are just shifted left and right and angled from view 1) The three camera transforms (camera to world coordinates) are transformation matrices $$C_1, C_2, C_3$$ Which look something like this: \begin{bmatrix} cos(\theta)& -sin(\theta) & t_x\\ sin(\theta)& cos(\theta) & t_y\\ 0 &0& 1 \end{bmatrix}

I have figured out we can draw lines originating at each camera point, and when applying a transform matrix to those lines, they will meet at the three points. Nine lines, nine unknowns... should be possible, yes? But how?
Here is our equations:

Lines from View #1 $$y_1 = -\frac{1}{2}x_1 C_1$$ $$y_2 = 0x_2 C_1$$ $$y_3 = \frac{1}{2}x_3 C_1$$ Lines from View #2 $$y_1 = -\frac{1}{2}x_1 C_2$$ $$y_2 = x_2 C_2$$ $$y_3 = \frac{1}{2}x_3 C_2$$ Lines from View #3 $$y_2 = -\frac{1}{2}x_2 C_3$$ $$y_1 = -x_1 C_3$$ $$y_3 = \frac{1}{2}x_3 C_3$$

But I don't know how to solve for this. (My linear algebra is poor) I realize there is no absolute answer but we should be able to make everything align by some scaling or projection factor. i.e. Once we know one camera position, we know the rest.

(I eventually need to write a computer program to do this for 3D but I need to understand the basic principles first. The paper this is based off of is unsupervised 3D reconstruction by Brown and Lowe. The process is described there and here but I do not understand it.)

Anyone know how I would go about solving this?

1

There are 1 best solutions below

0
On BEST ANSWER

First off, the slope/intercept form of lines is not good for working with matrices. You should use the standard form, Ax + By + Z.

Second, there's no way to solve for multiple matrices in one go. You have to break it down to its multiplications and divisions. When you put this into linear form (that's just what its called), you can solve it using a least-squares or SVD or inverting method.

Third, those methods won't work here because it will say the answer is zeros. Put zeros in everything and you have an answer. To fix this you will have to 'hard-code' some of the variables. This may mean your solving methods find a solution - or it may not.

Fourth, each of your matrices contains 3 variables, so you aren't solving for 9 variables, you're solving for more than that. Therefore you will need more data points, more lines, more views