0
$\begingroup$

I'm trying to work out how to estimate camera movement between 2 equirectangular photos (static scenes indoor). Both photos are taken with the same camera (Ricoh Theta S) on the tripod. Height of the camera from the floor is known and same for both photos. Pitch and yaw is known as well. There is a line of sight between both placements of the camera. Is what I'm after even possible? Cheers. Kuba.

$\endgroup$
1
$\begingroup$

Is what I'm after even possible?

yes.

Let's start with the simplification your camera was a perfect pinhole camera.

For starters, imagine you pick an arbitrary point object in your scene. You then get a camera matrix $\mathbf C$ that allows your to predict the 2D position $\mathbf y$ in your image of your 3D-positioned object at $\mathbf x$:

$$ \mathbf y = \mathbf {Cx}, \quad \mathbf y= \begin{pmatrix} y_1\\y_2\\1 \end{pmatrix}\in\mathbb R^3,\,\mathbf x= \begin{pmatrix} x_1\\x_2\\x_3\\1 \end{pmatrix}\in\mathbb R^4,\,\mathbf C \in \mathbb R^{3\times 4} $$

Notice that $\mathbf C$ isn't reversible, ie. there's multiple $\mathbf x$ that explain a $\mathbf y$.

Now, translating your camera by a movement vector $\mathbf m$ is the same as shifting the scenery by $\mathbf{-m}$, which leads to a $\tilde{\mathbf{x}}= \mathbf x - \mathbf m$.

Correspondingly, we get a

$$\tilde{\mathbf{y}} = \mathbf C\left(\mathbf x - \mathbf m\right)\text.$$

Now, since $\mathbf C$ is a matrix, i.e. a linear operator, this leads to

$$\begin{align} \tilde{\mathbf{y}} &= \mathbf C\mathbf x - \mathbf C \mathbf m\\ &= \mathbf y -\mathbf C \mathbf m\quad \iff\\ \mathbf C\mathbf m &= \mathbf y - \tilde{\mathbf y}\text. \end{align}$$

As mentioned above, $\mathbf C$ isn't reversible, which means that from a single photo you can't tell the 3D coordinate of a point without additional info. However, if you can identify three objects at different points $\mathbf y_{a,b,c}$ and $\tilde{\mathbf {y}}_{a,b,c}$, you should be able to elimate the unknowns from the system of equations.

Also note that your real camera isn't a perfect pinhole camera, and that might be used to actually get a less underdefined system, so you might be able to mathematically derive a unique solution with less than three points.

$\endgroup$
  • 1
    $\begingroup$ please expand a bit! $\endgroup$ – Peter K. Oct 21 '16 at 18:03
  • 1
    $\begingroup$ I should probably have done that in the first place, before hitting "submit"; a time-robbery happened after and I couldn't finish. Now starting anew. $\endgroup$ – Marcus Müller Oct 22 '16 at 10:37

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.