Back-projecting Pixel to 3D Rays with an origin different than zero

155 Views Asked by At

I am trying to reproject a pixel in a calibrated camera image into a 3D ray. I have found this answer which helped me a lot, and have almost everything running

Back-projecting Pixel to 3D Rays in World Coordinates using PseudoInverse Method

However, for my application it is important to be able to change the starting point of the ray.

In the example above, the starting coordinate t was (0,1,0). I thought I could just change this vector, but changing it also changes the direction of my vector. I would think this is wrong, since the direction of the ray should be the same, regardldess of the starting point. Right?

I have tried multiplying R*t to account for the rotation before applying the translation, but that doesn't seem to work either.

How can I change starting point from (0,1,0) to the correct starting point of my camera