How can I project an arbitrary plane identified by 4 points onto a 2d plane?
Asked Answered
S

1

6

The issue we are trying to solve the issue of locating a point in two different representations of a plane. The first plane we have is rotated to create perspective; the second is a 2d view of that same plane. We have 4 points on each of the plans that we know to be equivalent. The question is if we have an arbitrary point in plane 1, how do we find the corresponding point in plane 2?

It is best probably to illustrate the use case in order to best clarify the question. We have an image illustrated on the left.

Projective plane

alt text

2D layout diagram of space

alt text

So the givens that we have are the red squares from both pictures. Note that if possible, I’d like it to be possible that the 2D space isn’t necessarily a square. These are available to us ahead of time and known. I also have green dots laid out on the plane in the first image. I’d like to be able to do a projection of the dot in image 1 onto the space in image 2.

Note also for the image 1 I do not have a defined window or eye position. I just know that the red square from image 1 is a transform of the red square form image 2 and that the image 2 is in 2D space.

Standing answered 18/11, 2010 at 16:48 Comment(2)
It may be possible if you have (x,y,z) for your photograph points ... or if you ASSUME some z ...Nabob
If you like OpenCV, this problem is known as finding the homography (cv::findhomography). When done, any point in your first image is mapped into the second view applying x'=Hx in homogeneous coordinates.Klarrisa
W
7

This is a special case of finding mappings between quadrilaterals that preserve straight lines. These are generally called homographic or projective transforms. Here, one of the quads is a square, so this is a popular special case. You can google these terms ("quad to quad", etc) to find explanations and code, but here are some for you.

Perspective Transform Estimation

a gaming forum discussion

extracting a quadrilateral image to a rectangle

Projective Mappings for Image Warping by Paul Heckbert.

The math isn't particularly pleasant, but it isn't that hard either. You can also find some code from one of the above links.

Update

And this is one of my favorites: Computing a projective transformation

Wilma answered 18/11, 2010 at 19:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.