-1

I am taking the Computer Vision course, and I had some problems while doing some exercise: I have the intrinsic matrix K, and extrinsic matrix [R|t] of a camera as followings,

K =

478.989 2.67423 405.437

0 476.472 306.35

0 0 1

[R|t] =

0.681951 -0.00771052 -0.734232 -46.1881

-0.344648 0.882047 -0.331892 -42.4157

0.645105 0.479386 0.598855 118.637

the real world coordination is shown in the picture

I want to calculate "camera position relative to World coordinate", and the answer is supposed to be [X, Y, Z] = [74.18, 69.421, 50.904]

How can I get the answer? It just took me a lot of time, but I can not figure it out.

cptsai
  • 1
  • 3

1 Answers1

0

This OpenCV document details how to convert from world to camera co-ordinates.

x = K[R T]X

where x is 2D image co-ordinates and X is 3D world co-ordinate. Using above what you want is X which is nothing but:

X = inverse(K[R T]) * x

Now, put your values of x (u, v, 1) and you should get the value of X which is your required 3D co-ordinate.

littlie
  • 21
  • 2