# camera motion detection

I am working on camera motion detection.How do I decouple translation and rotation? I have obtained rotation by using sensors. I understand we can do something as simple as X'=RX+T , where R-rotation, T-translation and X,X' are the points involved. These points are 3D points(either world or camera coordinate system). How do i determine these 3D points by analyzing an image?

Is there any other way to obtain translation? (some Image Processing technique may be?)

If X are known 3D points, then the translation is given simply by:

$$T=\frac{\sum_{i=1}^{n}{X'_{i}-RX_{i}}}{n}$$

In case of points being in projected coordinates, then more work have to be done. You can express the 3D points in homogenous coordinates:

$$X=(x, y, z, w)$$

where $w$ is 1 by default.

Then both the translation and rotation can be joined via matrix multiplication:

$$X'=TRX=\begin{bmatrix}1 & 0 & 0 & t_{x} \\ 0 & 1 & 0 & t_{y} \\ 0 & 0 & 1 & t_{z} \\ 0 & 0 & 0 & 1 \end{bmatrix}RX$$

Furthermore, you would be able to add camrea projection matrix in the equation:

$$X'=TRPX$$

Now each point correspondence ($X\leftrightarrow X')$ will give you 4 equations. The minimum number of point correspondences depends on the number of unknowns.

There are usually more than enough points and the problem is overdetermined. The above equation can then be solved in a least-squares fashion.

Another approach is to first perform camera calibration to determine matrix $P$. Then the problem will be simplified greatly.

The best reference I know is (what else) H&Z book. Chapter 7 is all about computing the camera matrix.

Estimation methods are described as well.

• But as I have pointed out in the question, I don't have these 3D points. Is there any way I can determine them by having multiple point correspondences(basically 2D points on the image?) – user2155669 Mar 27 '13 at 4:49
• The camera projection matrix $P$ is $3\times 4$ matrix, so it converts 3D points to 2D points (both in homogenous coordinates). So the relation between two 2D points is: $X'=PTRP^{-1}X$ where $P$ is the camera projection matrix and $T,R$ are translation and rotation matrices, respectively. – Libor Mar 27 '13 at 16:40
• It is much easier to solve for $T$ if $P$ and $R$ are known beforehand. You already know $R$ and the $P$ can be determined from at least two corresponding images (explained in detail in the H&Z book). – Libor Mar 27 '13 at 16:42
• I obtained the matrix P and its right pseudo inverse P^-1. But I find that the operation (which is part of your equation) P^-1 * X gives me a 3D point which is an infinite 3D point(in homogeneous coordinates) of the form [a b 1 0]T. When I continue the calculation, the 0 in this 3D point will eliminate the 4th column of the matrix T. Therefore it doesn't give me translation. Am I missing something? – user2155669 Apr 1 '13 at 9:59
• Not sure. Maybe the inverse P won't work as its X describes just a ray (which has information of angle, but not depth). I forgot that it is more tricky when camera moves (used equation from panoramic imaging where the camera is restricted to rotation only). Obtaining 3D points from multiple view can be solved via Bundle Adjustment. Or you can take a look on the book which describes the mechanics in more detail. You can still inject your known rotation matrix into the bundle adjustment equations to simplify the computation. – Libor Apr 1 '13 at 14:58
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}