Ask Your Question

Relative marker position

asked 2018-10-19 05:47:53 -0500

klayman gravatar image

updated 2018-10-19 06:09:59 -0500

berak gravatar image

Hello, I am using solvePNP to compute the poses relative to two planar markers.

The markers 0-1 are identical and both visible in the same frame, say more or less like two checkerboards. My final goal is that I want to calculate the marker 1 coordinates relative to marker 0.

I have pose P0=[R0 t0], pose P1=[R1 t1]. Please note that the poses are calculated for the same image, so they are in fact the same pose relative to two different markers. I have calculated those based on equal 3D point coordinates for both poses, since the markers are identical.

Now I want to get the 3D transformation that brings 3D points of one marker to 3D points on the other marker, so that I know the relative positions of the markers.

I know I can calculate a transform which converts the pose relative to marker 1 to a pose relative to marker 0 as such:

T01 = [R0 t0] [R1-1 -R1-1*t1] = [R0*R1-1 -R0*R1-1*t1+t0]

With this I can transform a generic pose P2 relative to marker 1 and get the pose from marker 0:


How do I use this information to get the trasnform from marker 0 coordinates to marker 1?

edit retag flag offensive close merge delete


Just invert T01^-1 = [R | t] = [R^t [ -R^t*t] or compute T10.

Please note also that you should use rotation transpose instead of rotation inverse.

Eduardo gravatar imageEduardo ( 2018-10-20 04:56:45 -0500 )edit

The inverse of T01 is still a pose transform, not world coordinates transform. I found the correct way: P1 takes points from world coordinates W1 to camera coordinates, then P0-1 takes the camera coordinates to world coordinates W0. so the transform to go from W1 to W0 is Tw=P0-1*P1.

This seems to be different from either T01=P0P1-1 or even T10 = P1P0-1.

I will post the more complete answer when possible (2 days limit).

klayman gravatar imageklayman ( 2018-10-20 10:36:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-10-21 09:50:38 -0500

klayman gravatar image

The answer is different from the "pose conversion" matrix.

Given poses P0,P1, the conversion of poses relative to marker 1 to pose relative to marker 0 is Tp = P0*P1-1

P1 converts from world coordinates W1 (relative to marker 1) to camera coordinates, P0-1 converts camera coordinates to W0 (relative to marker 0), so the transform from world coordinates W1 to W0 is:

Tw = P0-1*P1.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-10-19 05:47:53 -0500

Seen: 36 times

Last updated: Oct 21 '18