I had a similar situation like described in this question. Within the question, the user who asked wrote the following equation:
It seems to work *, but does somebody know, how to get this equation? I was not able to find anything like this anywhere else...
Thanks in advance!
*) I also guess I kinda understand the equation: the left part is the ray coming from the camera and going through the image point, therefore on the right side the real-world coordinates have to be translated and rotated as if the camera would be placed in (0,0,0)... sort of? I just can't find a paper or anything to confirm the equation