How to get rotation angles of Image Plane relative to the World Plane? - MathOverflow most recent 30 from http://mathoverflow.net 2013-06-20T05:06:17Z http://mathoverflow.net/feeds/question/38742 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/38742/how-to-get-rotation-angles-of-image-plane-relative-to-the-world-plane How to get rotation angles of Image Plane relative to the World Plane? Ole J 2010-09-14T22:36:26Z 2010-10-02T13:10:17Z <p>So we have such situation:</p> <p><img src="http://i.imgur.com/Txxn0.gif" alt="1"></p> <p>In this illustration, the first quadrilateral is shown on the Image Plane and the second quadrilateral is shown on the World Plane. [<a href="http://alumni.media.mit.edu/~cwren/interpolator/" rel="nofollow">1</a>] </p> <p>In my particular case the Image Plane has 3 quadrilaterals - projections of real world squares, which, as we know, have same size, lying on the same plane, with same rotation relative to the plane they are lying on, and are not situated on same line on plane.</p> <p><img src="http://i.imgur.com/au8dm.jpg" alt="2"></p> <p>I wonder if we can get rotation angles of Image Plane to World Plane knowing stuff described?</p> <p>In my case as input I have such data structures: original image (RGB pixels), objects (squares) with angles points in pixels (x,y) on Image Plane.</p> <p>Problem I am describing is generally known as pose estimation - determining the 3D orientation and position of an object relative to a camera from a 2D view. </p> http://mathoverflow.net/questions/38742/how-to-get-rotation-angles-of-image-plane-relative-to-the-world-plane/38746#38746 Answer by sleepless in beantown for How to get rotation angles of Image Plane relative to the World Plane? sleepless in beantown 2010-09-14T23:37:04Z 2010-09-14T23:46:52Z <p>I believe this is the same question you asked earlier (22 hours ago), and I think it is asking for exactly the same answer.</p> <p><a href="http://mathoverflow.net/questions/38627/is-there-an-algorithm-for-soving-such-projection-reconstruction-geometric-problem" rel="nofollow">http://mathoverflow.net/questions/38627/is-there-an-algorithm-for-soving-such-projection-reconstruction-geometric-problem</a>.</p> <p>Didn't Joseph O'Rourke's answer about projective geometry and his pointer to a page about <a href="http://stackoverflow.com/questions/169902/projective-transformation">projective transform</a> on stackflow help you? </p> <p>You may also attempt to solve it yourself as a mathematical exercise. Using your own senses, you can see that the illustration is a 7x7 grid with three red squares on it it the positions (3,4), (5,2), and (5,5) depending on how you define your coordinate system. If this drawing were on the $xy$ plane and your camera is on the $z$-axis at a height $h$ and pointing at the origin point(0,0,0), with the $x$-axis horizontal and $y$-axis vertical in your projective image, then what would the camera see?</p> <p>Now think about how the camera views the image looking at it from different positions. You will have to find the six coordinates describing the camera:</p> <blockquote> <p>its position in space, $x, y, z$</p> <p>its orientation in space, however you choose to define it</p> </blockquote> <p>Try to work out the problem. If you have trouble with it, look at stackoverflow again. Or search for more pages about projective transforms, coordinate transforms, 3-d rendering, ray-tracing, or even the basics of <a href="http://en.wikipedia.org/wiki/Opengl" rel="nofollow">OpenGL</a> (open graphics language) which will help you understand the basics of visual raytracing and projective transformations. A lot of the pages will present matrix representations of the coordinate transforms, which may help you if you understand matrices. But if you don't understand matrices, try to solve it with separate linear transformation equations.</p>