Ask Your Question
0

Eliminate scaling from perspective transform

asked 2013-06-30 09:40:03 -0600

Rares Musina gravatar image

I would like to project an image to a textured wall. Using various techniques I was able to detect the wall plane, and now I just want to draw the image on that plane.

The plane itself is a quadrangle, and I was able to get a perspective transform matrix between the image and the wall plane, and use that transform to perform the projection. My only problem is that the image is scaled up to occupy the entire quadrangle of the wall plane. I would only like it to follow its perspective, without the changes in scale. Can I somehow eliminate the scaling from the transformation matrix, or is there any other method that would help?

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-06-30 15:50:52 -0600

SR gravatar image

updated 2013-06-30 15:51:48 -0600

If your perspective mapping matrix is P you can apply this transformation followed by scaling and translation: Simply apply the scaling matrix S and the translation matrix T to the quadrangle corners:

P' = T * S * P (matrix multiplications)

edit flag offensive delete link more

Comments

Thanks for the response! Do you happen to know how to split the transformation matrix into scaling and translation matrices? I was thinking of applying the transposed scaling matrix to my transformed quadrangle, in order to scale it back to its original size.

Rares Musina gravatar imageRares Musina ( 2013-06-30 18:37:27 -0600 )edit

Question Tools

Stats

Asked: 2013-06-30 09:40:03 -0600

Seen: 700 times

Last updated: Jun 30 '13