I have a 2D projection of a flat, rectangular object in 3D space, like this one:
(I lack the reputation to post this inline, sorry.)
I know all sorts of information about this shape—its opposite sides have the same length, the sides meet at right angles, the ratio of one side length to another. However, I don't know the details of the projection or the vertices coordinates in 3D space.
I'd like to compute the perspective transformation I'd use to, e.g., paint text over the 2D image so that it matches the camera's perspective as if it existed on the 3D model.