# Aligning 2 Coordinate Systems

I have a camera and a table and I want to align the camera to co-exist in the same coordinate system as the table. Here is an image of the setting.

What type of mathematical transformations I need to apply?

Here is what I think I need to apply: 1. Translation to the Z-axis. 2. Rotation to the Y-axis with a negative angle. 3. Rotation to the X-axis with a positive angle.

Do I need to rotate the Z-axis as well? The camera sees points on the table and I want to rotate my points around the Y-axis only. However, is this even correct if my coordinate systems are not aligned for all axis.

Sorry if it is not very clear. English is not my first language.

The transformations here are affine 3D transformations, which can be expressed nicely as $4 \times 4$ matrices using homogeneous coordinates.
• I assume your goal is to relate table coordinates $(x,y,z)$ with coordinates $(sx, sy)$ on the screen / image which is recorded by your camera. This kind of transformation is explained in many books on 3D graphics, like the one mentioned by me. – mvw May 2 '16 at 9:18
• No, the transformations should just lead to vectors of the form $(x,y,z,1)$. Possible errors are picking the wrong transformation or wrong order of application of the individual transformations. The advantage is that the translations can be expressed as matrices as well, and you will need a translation if your origins differ. – mvw May 2 '16 at 16:58