Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

distance calculation of Rotation and Translation matrices of 2 objects on the same plane

Tags:

opencv

I have a question regarding Rotation (R) and Translation (T) matrices, I hope someone can help me as we use R and T a lot in robotics to find the position of the robot.

I have R and T of an object frame in regards to a camera frame and R and T of a second object in regards to the same camera. If both objects are on a common surface/plane

question #1: (being on the same surface/plane) this means R for both objects in reference to the camera is the same! is this assumption correct?

question #2: how can I compute the distance between objects (along an x or y axis for example) using the translation matrices?

I have a 1x3 translation matrix and a 3x3 rotation matrix => I derived a 4x4 transformation matrix from R and T

thanks in advance

like image 512
Sha Par Avatar asked Jan 27 '12 18:01

Sha Par


People also ask

How do you combine rotation and translation matrix?

A rotation matrix and a translation matrix can be combined into a single matrix as follows, where the r's in the upper-left 3-by-3 matrix form a rotation and p, q and r form a translation vector. This matrix represents rotations followed by a translation.

Are translations and rotations commutative?

Now consider translation and rotation. t is a fixed point under the rotation if and only if t is on the axis of the rotation. As a result, we say translation and rotation is commutative if and only if the translation vector and rotation axis is collinear.


1 Answers

Answer to 2): If translation is the vector resulting of subtracting point2's position to point1's position then Euclidean distance follows the formula linked here.

Then you just need to compute sqrt(x^2 + y^2 + z^2) as (x,y,z) of translation vector(between 1 and 2) as it is already the difference between the two points coordinates.

That means you have to compute the euclidean norm of the translation vector.

If you have 2 translation vectors (one for each point) then just subtract them, and calculate the euclidean distance of the resulting vector.

like image 86
Jav_Rock Avatar answered Sep 22 '22 05:09

Jav_Rock