Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a 2D projection of a flat, rectangular object in 3D space, like this one:

http://i.stack.imgur.com/0CDa4.png

(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.

share|improve this question
add comment

1 Answer

Given the four points of the transformed rectangle, you can compute 2D perspective transform by solving system of eight linear equations.

The stability of the solution depends on coordinate system, precision of point locations and distance from nearest degenerate configuration.

A method proposed by Hartley & Zisserman (Multiple-View Geometry) is thus a Normalized Direct Linear Transformation, which does preconditioning prior to solving the linear equations (the preconditioner is basically an affine transform that maps coordinates of two quadrilaterals into common frame and scale).

Note that linear solution of the problem minimizes only algebraic distance and has little geometrical meaning. Iterative solution with geometric cost function (e.g. symmetric transfer error) should be considered in presence of noise. This essay may be helpful.

You can find more under the keywords "homography estimation".

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.