# Eliminate scaling from perspective transform

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 close merge delete

Sort by ยป oldest newest most voted

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)

more

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.

( 2013-06-30 18:37:27 -0500 )edit

Official site

GitHub

Wiki

Documentation