View Full Version : Inverse projection mapping

Martin G.
07-09-2009, 01:49 AM

I have the following situation. I have a projector. Also I have calculate a view and a projection matrix. Now I can do a projaction mapping. But I would like the inverse way. I have the texture (maybe 512 x 512) and each pixel would describe by a texture coordinate. For example the pixel on 256 x 256 has the u = 0.5 and v = 0.5. That is what I known. Can I calculate the point in world space with the uv-coordinate, projection matrix and the view matrix? Is it possible?

Thanks, Martin

07-11-2009, 11:44 AM
My take:

Let P = projection matrix , V = view matrix and t = tex coord.
Let t=(0,0) for actual projected point p(0,0)

t(0,1) = p(0,512) [because your image is 512*512]
t(1,0) = p(512,0) and t(1,1) = p(512,512)

Now apply P inverse on all points to get points in view space.
Then apply V inverse to get them in world space.

p(x,y) in world space --> p(m,n) in view space --> p(a,b) on Image after projection. Now p(a,b) is assigned texel coordinate
t(s,t).Thus you have the correspondence.

Problem occurs when you do not know the transformation matrices.In that case you need to get correspondence data of of more than one texel to find out a parameter in the matrix and use equations.

Hope this helps.