Angles of rotation tool

Back to reference scale page

Fig 1. Reference scale on a windshield

To the right is a photo of the reference scale resting on a car windshield. Enough information can be gleaned from that image of the reference scale to determine the tilt of the windshield, and the angle of view of the camera: the windshield tilts back 56°, and the camera's gaze was at an angle of 52° from the right and looking down at an angle of 38°.

This is possible because when photographed obliquely, the circular target on the reference scale will appear in photos as an ellipse, from which we can determine the angle between the camera's view and the axis of the disc on the reference scale.

Furthermore, if the horizontal axis of the perspective disc on the reference scale was aligned to horizontal (ie., was level), and the camera was also horizontal (level, though possibly angled looking down or up), it's possible to find the angles of rotation (horizontal and vertical) of the disc in the real world with respect to the ground, and the angle by which the camera was pointing down or up.

Use the calculator on this web page (below) to analyse an ellipse in one of your own photos.

Measuring the ellipse in a photo that includes the reference scale

Photoshop can be used to obtain the major/minor axes lengths and tilt from an image by matching an ellipse path generated by Photoshop to one in a photograph (more accurate than 'eyeballing' it). Here's the procedure I use with Photoshop:

Fig 2. The circular target of figure 1, with measurements

Next, the tilt of the reference scale's horizontal is easily measured using Photoshop's 'ruler' tool (the angle of a ruler line with respect to horizontal is displayed in the Info panel and on the options bar). If you measure left to right, the angle displayed by Photoshop will be relative to horizontal and negative -- convert that to positive for 'tilt of scale' in the form above. For better accuracy, measure your ellipse from its extreme left to right (instead of its center to right).

As an example, measurements of the reference scale in figure 1 (upper right) on a car windshield, shown in figure 2, have been pre-entered into the calculator below, with the results displayed.

Calculate angles between disc and camera's view

The more information you enter below about the ellipse, the more rotations can be calculated. This form assumes the photo was taken more than a meter from the subject (see Ellipse trivia for how to tell). Click 'Clear form' and then enter your info.

One Minor axis length (any units of length)
Major axis length
Two Tilt of ellipse major axis (degrees), relative to the image vertical, clockwise from "12 o'clock" (-89° to 89°; 0° = no tilt)
Three Tilt of scale's horizontal (degrees), relative to the camera horizontal, clockwise from "3 o'clock" (-180° to 180°; 0° = no tilt)

Error msgs here

One rotationTwo rotationsThree rotations
Reference frame:
Camera line of sight
Reference frame:
Camera frame
Reference frame:
Real world
orAngle
Minor:major = 1.0
or Vertical rotation
(top pushed back)
Horizontal rotation
(right pushed back)
or Vertical rotation
(top pushed back)
Horizontal rotation
(right pushed back)
Camera dip
(looking down)

Alaises (possible alternate solutions with identical ellipses)

Projection type:

(If this form makes an error, please send me a note including the values entered.)

Aliases

The way the math works out, there is more than one solution (ie., set of rotations) for a given ellipse, usually corresponding to a 'left' or 'right' view. Which one is best is usually obvious from the rest of your photo, but in orthographic projection, the ellipses in isolation are identical and indistinguishable (to see this, click the 'Orthographic' button above).

For the windshield analysis above, the two aliases correspond to the scale being viewed from the left or right. Looking at the photo containing the reference scale, it looks like the alias with the right side of the reference scale toward the camera is best, which corresponds to the second alias in the results. Also, we could pick that same alias because we know windshields lean back; we expect a positive vertical rotation.

Ellipses 'in the wild'

Sometimes there are circles 'in the wild' with horizontals marked, such as the clock faces in the photo below, of London's Big Ben clock tower. The two clocks in the right-most image have been marked up using Photoshop with the ellipses (red), their major axis (white), and the horizontal (green).

The measurements of the ellipse thus obtained are as follows:

  Left clock  Right clock
Minor axis (length, pixels)63 px58 px
Major axis (length, pixels)86 px86 px
Tilt of major axis (degrees clockwise)-7°
Tilt of horizontal (degrees clockwise)-7°

Do those measurements make sense? Assuming the clock faces are vertical, the vertical rotation ('tilt back') should be zero. Assuming the tower plan is a regular rectangle, and is viewed from a less-than-infinite distance, the sum of the horizontal rotations ('push right'), ignoring their signs, should approach but not reach 90 degrees (if it were viewed from infinity, it'd be exactly 90 degrees). The camera dips should be equal (because the camera is looking at both clocks at the same angle) and negative (because it is looking upwards at them).

Entering Big Ben's clock measurements in the form above, the results and expectations are summarized below:

Left
clock
Right
clock
Expectation
Vertical rotation (top tilted back)
Horizontal rotation (right tilted back)-42°47°90° (|-42°| + |47°| = 89°)
Camera dip (looking down)-8°-7°Approx equal and negative

The results are close to expectations. Using this information, we could probably figure out from where the photo was taken.

Ellipse trivia

Comments?

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.