Examples
Ph. Dalleur
Scroll down to read
Ph. Dalleur
Scroll down to read
With the help of the Blender® 3D program, we produce a template for any photo with sufficient characteristics to fix the Vanishing Point VP of the sun's rays, the Horizon line H projection, and the camera's Center of View C on the photo (see Figure 1). VP is divergent in the photo in Figure 1 (it may be convergent with VP opposite to the Sun's position - see an example in Figure 2, the computer-generated test photo). The outward direction of the sun's rays gives the center of the sun's image in the photo (the blue lines convergence point). H seems slightly tilted and estimated from reflections on the water of the lake (approximative estimation). The reason is probably the camera's roll angle (estimation gives about 0.9°). There is also a much greater upward pitch angle given by the distance h between the Center of View C in the photo and the horizon line H.
Figure 1. Castelgandolfo (Italy). This photo presents some difficulties to estimate the sun's height. It is dark. The horizon line is difficult to estimate. The sun is in front of the camera and partially veiled. There are no shadows. Nevertheless, the sun's rays through the clouds make it easy to estimate the position of the vanishing point VP, which happens to be at the center of the photographic image of the sun (with blue lines converging to VP). Even if the sun's image is not sharp and veiled by the cloud layers, the extrapolated rays converge to a precise vanishing point VP. The Center of View C is simply given by the center of the image as the camera does not use special lens control systems. The horizon line H position and angle are guessed by some extrapolation between the mount and its reflections on the lake's surface. H seems slightly tilted. As the camera has an upward pitch angle, it is not easy to evaluate the roll angle of the camera. The median line must be about parallel to the horizon line H, but H is also somewhat higher, especially if we consider that the photo is shot about 115 m above the lake surface. Cavo Mountain is about 5 km far away, but its reflected top is not visible in the frame. We decided to place the horizon H just above the median line as a rough estimate. Some more topological information would be needed to get more precision. The position of H and its photographic angle (=camera's roll angle) is the most critical source of error in this photo [Latitude: 41.75112° N; Longitude: 12.64825° E; Date and Time: 2013:04:26 - 07:47:42. Sun's astronomical height=16.59° and azimuth=86.38° (see https://www.suncalc.org/#/41.7511,12.6483,13/2013.04.26/07:48/1/3 )].
In order to evaluate the position of the sun, we first generate the following computer-generated test photo (Figure 2) from which we will create a general template "*.blend" file. The test image has the following calculated characteristics: focal length FD=20mm, sun elevation φ=30°, and relative azimuth AZ=45° behind the photograph.
Figure 2. The computer-generated test image used to create the template with the needed characteristics: Horizon H, Horizon Center Hc, Center of View C, Vanishing Point VP. Blender Software generated this test photo with parameters: focal length FD=20mm, sun elevation φ=30°, and relative azimuth AZ=45° behind the photograph.
There are generally three steps to estimate the elevation angle and the relative azimuth angle :
1) Analysis of the geometry of the photo to determine the Vanishing Point VP of the sun's rays in the photographic plane. This is purely geometrical, and no prior knowledge or assumption on the camera's parameters or position is needed. Some photos make this step obvious. For example, the photo of Figure 1 (Castelgandolfo Italy) in front of the sun through some clouds with visible rays, gives an immediate estimation of the vanishing point by extending the directions of the rays. They converge to the vanishing point at the center of the sun's image.
2) Estimation of the horizon line H and the center of view C. Common cameras do not make use of perspective control photography (the lens is normally centered and not shifted or tilted, or distorted as with fisheye lenses that appeared in the 1920s). Let us further assume we have an uncropped photo. The center of view C is then located at the center of the image as in Figure 1. To estimate the horizon line H, we can take the vanishing points of some horizontal edges of buildings, or as in Figure 1. some reflections on horizontal planes (water surface). H is between the direct image and mirror image on the water. The perspective must be taken into account to estimate the position and roll angle of H.
3) Equivalent Focal Distance FD is estimated in Figure 1 to be FD=35..39 mm for this camera (ASUS phone camera; nominally it should be 35 mm). This gives a Field Of View FOV = 2*arctan(18/FD) = 49.55 ... 54.43°.
Using our Blender template we get the following results for elevation φ. The python script calculates the elevation for FD=35 mm (the expected camera value) to give φ = 17.07°, and 15.75° when FD=38 mm. FD=35 mm shows some problems with the vertical direction of the wall at the right and FD=38 mm seems to correct this (see the difference with the vertical probe). Actually, our roll angle estimate may be slightly too large. A roll angle of 0° gives no verticality problem at FD=35 mm, and φ = 16.93°. Compare these results with the astronomical data 16.59°.
We rotated the photo with the H roll angle ~ 0.9° to make the horizon horizontal and we measure the rotated coordinates of VP relative to C (C = (0, 0) per definition).
Figure3. The Saint Hubert photo is an example with pitch and roll rotation angles.
The sun estimated elevation is 50.246°. Estimation of the Horizon and the roll angle takes into account the height of the camera (height of a car window) and the horizontal pedestal of the stag statue. The estimated Focal Distance is 28 mm (the manufacture data is ~27 mm) when compared to another calibrating photo 18 mm/90° FOV. FD and Camera tilt were tuned to fit the vertical lamp posts with the HUD. The Vanishing Point VP is far below as the elevation is quite high. From astronomical data, the elevation on August 17, 2020, at 12.37 pm, should be 50.82°.