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.

When taking a picture of a cross, if the center of the cross is known, is there any way to determine the angle at which the picture was taken based on the number of points on the y axis above and below the x axis?

For example, the line of the x axis is between the points (0,5) and (10,5). The line of the y axis is between the points (5,0) and (5,10). If a picture of this cross was taken from directly above it, the amount of points above and below the intersection point (5,5) would be equal. However, if a picture of this cross was taken at an angle, the amount of points above and below the intersection point would not be equal due to the change in perspective.

Is there any way the angle could be determined based on that ratio of points above and below the intersection on the y-axis?

Sorry if I tagged the post improperly, not sure what this would fall under.

share|improve this question

1 Answer 1

Is the "camera" fixed to a certain $x, y$ position, or is the camera fixed to tilt only? Adjusting the $x, y$ position of the camera would also change the number of points above and below the $x$-axis.

Edit:

I'll assume that the camera and cross are both centered at the origin. You'll need the distance from the camera to the surface, to determine $\theta$.

Let $\alpha$ be the $y$-coordinate of the center of the cross, and let $\beta$ be the distance from the camera to the surface. The angle of tilt of the camera will be

$$ \theta = \arctan \left(\frac{-\alpha}{\beta}\right) $$

Use $-\alpha$ because a negative tilt with respect to the origin will read a positive $y$-coordinate for the center of the cross, and a positive tilt with respect to the origin will read a negative $y$-coordinate.

share|improve this answer
    
Yes, the camera will have a crosshair targeted on the intersection point in order to center the image. –  vinbrando Apr 14 '12 at 17:53
    
I take it there's no way to determine the angle if the distance from the camera to the surface is variable? –  vinbrando Apr 14 '12 at 19:29
    
Well, the angle is partly determined by the distance from the camera to the surface, so no. Details (the $y$-coordinate, in this case) that can be seen at a very wide tilt whilst close to the surface can also be seen with almost no tilt when viewed from much further way away. –  Patrick McLaren Apr 14 '12 at 19:50
    
Hmm...well maybe there's another solution you may be aware of. Im taking a picture of a graph at a varying tilt and need to transform it. (i.imgur.com/cVTSH.png). The problem is I'm not transforming a rectangle so I don't have the 4 corner points I need to do the transformation. Is there any way to calculate the 4 corners of a perspective rectangle that would surround the crosshairs? –  vinbrando Apr 14 '12 at 21:04
    
Here's a better picture to describe what im trying to do. P1-P5 are known, and A-D are needed. i.imgur.com/Z7Wiy.png –  vinbrando Apr 14 '12 at 21:20

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.