Scientific Background
Overview
This document provides the scientific foundations for Planet Ruler’s photographic planetary radius measurement method. We begin with historical context establishing the geodetic challenge, introduce the geometric concept of the limb arc, examine whether cameras can resolve this signal,
and detail the mathematical methods for extracting radius from images.
Historical Methods
The challenge of measuring Earth’s radius has driven geodetic innovation for over two millennia. Each historical method illuminates different aspects of the measurement problem, providing context for modern photographic approaches.
Eratosthenes (c. 240 BCE)
The Greek mathematician Eratosthenes measured Earth’s circumference by comparing shadow angles at noon in Alexandria and Syene (modern Aswan), separated by approximately 800 km. When the sun was directly overhead in Syene (no shadow), it cast a shadow of about 7.2° in Alexandria. Using the known distance between cities, he calculated Earth’s circumference as \(C = 360° / 7.2° \times 800\text{ km} \approx 40{,}000\text{ km}\), yielding a radius of approximately 6,400 km—within 2-3% of the true value.
This method established the fundamental geometric principle: measuring angular differences across known baselines reveals planetary curvature. Modern photographic measurement inverts this approach—we know Earth’s radius and measure the angular size of the curved horizon to determine our altitude.
Al-Biruni (11th century CE)
The Persian scholar Al-Biruni refined geodetic measurement by observing the horizon dip angle from a known altitude. Standing on a mountain of height \(h\), he measured the angle \(\theta\) between the horizontal and the line of sight to the horizon. Simple geometry relates these quantities to Earth’s radius \(R\):
This method achieved approximately 0.5% precision and directly parallels photographic horizon measurement—both use the relationship between altitude and horizon geometry. The key difference is that Al-Biruni measured the dip angle of a distant horizon, while modern photography measures the curved shape of the visible horizon circle.
Geodetic Surveys (18th-20th centuries)
Large-scale triangulation networks, beginning with the French meridian arc surveys, achieved sub-kilometer precision through systematic angle measurements across continental distances. These efforts established that Earth is an oblate spheroid, not a perfect sphere, with the equatorial radius approximately 21 km larger than the polar radius.
Satellite geodesy (1960s-present) using GPS and laser ranging now measures Earth’s shape with centimeter-level precision, revealing detailed variations in the geoid. Modern photographic measurement achieves 1-5% precision, complementing rather than competing with satellite methods—its value lies in accessibility and educational transparency rather than ultimate accuracy.
Where Photographic Measurement Contributes
Photographic horizon measurement occupies a unique educational niche. Unlike Eratosthenes’ method (requiring travel between distant cities) or satellite geodesy (requiring specialized equipment), it can be performed by anyone with a camera during a commercial flight. Typical cruising altitude provides clear curvature visibility while remaining accessible to the general public.
The method’s transparency—every step from pixel coordinates to radius estimation can be examined and understood—makes it particularly valuable for teaching photogrammetric principles and geometric reasoning. While not replacing professional geodesy, it demonstrates that fundamental planetary measurements remain achievable with consumer equipment and careful analysis.
Basic Geometry
For photographic measurement, Earth can be approximated as a sphere of radius \(R \approx 6371\) km. While Earth is actually an oblate spheroid (equatorial radius ~21 km larger than polar radius), the spherical approximation introduces errors of only ~0.3%, typically smaller than measurement uncertainty.
The Horizon Circle
When an observer is elevated at altitude \(h\) above the surface, the visible horizon forms a circle where lines of sight become tangent to the spherical surface. This horizon circle has a specific radius and angular extent as seen from the observer’s position.
The horizon distance (surface distance from the point directly below the observer to the horizon) is:
For typical aircraft altitudes (10-20 km), this simplifies to \(d \approx \sqrt{2Rh}\) since \(h \ll R\). At \(h = 10\) km, the horizon is approximately 357 km away.
The Limb Arc in Images
When photographed, the horizon circle projects onto the image as a curved arc—the “limb arc.” The angular radius of this arc (measured from the camera’s viewing direction) depends on both altitude and camera orientation.
For a camera pointing at angle \(\theta_p\) below the horizontal (pitch angle), the limb arc appears as an elliptical segment in the image. The geometry is characterized by:
where \(\alpha\) is the angular radius of the horizon circle as seen from altitude \(h\). For \(h = 10\) km, \(\alpha \approx 2.0°\). At \(h = 100\) km, \(\alpha \approx 6.4°\).
Measuring the Curvature
The measurable quantity in an image is the vertical extent (sagitta) of the curved horizon relative to a straight line. For a horizon arc spanning width \(w\) pixels with curvature radius \(r\) pixels (in image coordinates), the sagitta \(s\) is:
This sagitta scales as \(s \propto \sqrt{h}\) for a fixed field of view—doubling the altitude increases the sagitta by only \(\sqrt{2} \approx 1.4\times\). This square-root scaling means that high altitude provides only modest improvements in measurement precision compared to moderate altitude.
The key insight is that the limb arc’s shape encodes the observer’s altitude \(h\) through the relationship between \(R\), \(h\), and the observed angular geometry. By measuring the arc’s curvature in an image with known camera parameters, we can infer \(h\) (if \(R\) is known) or \(R\) (if \(h\) is known).
Camera Specifications
Minimum Detectable Altitude
A key scientific question is: what is the minimum altitude at which planetary curvature becomes measurable? The answer is surprisingly low—modern cameras can detect Earth’s curvature from as little as 1-34 meters above the surface, depending on focal length and sensor resolution.
This calculation considers only geometric visibility: at what altitude does the horizon’s vertical extent (sagitta) exceed one pixel? For a camera with \(N_y\) vertical pixels, focal length \(f\), and pixel size \(p\), the minimum detectable altitude \(h_{\text{min}}\) occurs when the difference between the minimum and maximum y-coordinates of the horizon within the image equals one pixel.
Through numerical calculation of the limb arc geometry, we find:
Smartphone main cameras (f=26mm equiv, 4000px): \(h_{\text{min}} \approx 1\text{-}2\) m
Ultrawide cameras (f=13mm equiv, 4000px): \(h_{\text{min}} \approx 1\) m
Telephoto 3× (f=77mm equiv, 4000px): \(h_{\text{min}} \approx 2\text{-}5\) m
Telephoto 5× (f=130mm equiv, 4000px): \(h_{\text{min}} \approx 4\text{-}5\) m
Telephoto 10× (f=240mm equiv, 4000px): \(h_{\text{min}} \approx 34\) m
These values assume perfect optical quality and measurement precision. Real limitations arise from atmospheric refraction, optical aberrations, scene complexity, and measurement noise—not geometric constraints.
The key insight: Earth’s curvature is geometrically detectable from ground level with modern cameras. The “sweet spot” of 50,000-120,000 feet for horizon photography exists because curvature becomes obvious and easily measurable at these altitudes, not because it’s invisible below them.
Camera Parameters for Measurement
Three camera parameters determine the limb arc’s appearance in an image: sensor dimensions, focal length, and pixel resolution. The sensor converts incoming light into a digital image through an array of photosensitive elements. Typical sensors range from 1/2.55” (~5.6×4.2 mm) in smartphones to full-frame (36×24 mm) in professional cameras. The pixel count determines measurement resolution—modern cameras provide 3000-8000 pixels along the sensor’s long axis.
The lens focal length controls the field of view—shorter focal lengths (wide-angle lenses) capture more of the horizon circle but with lower angular resolution, while longer focal lengths (telephoto) magnify a smaller region. For horizon measurement, the critical quantity is the angular size of one pixel, given by \(\theta_{\text{pixel}} = \arctan(p/f)\) where \(p\) is pixel size and \(f\) is focal length. Smaller pixel angles enable finer curvature discrimination.
The camera’s orientation in 3D space—particularly the pitch angle relative to horizontal—determines which portion of the horizon circle appears in the image. A camera pointed slightly downward captures more of the curved arc, while one pointed at the horizon shows primarily the tangent point with minimal visible curvature. This orientation must be determined during analysis as part of the measurement problem.
Signal Scaling with Altitude
The measurable signal (sagitta) scales as \(s \propto \sqrt{h}\), meaning curvature grows slowly with altitude. Doubling altitude increases the signal by only 41%. This square-root scaling has important implications: measurements at 10 km altitude are not vastly superior to those at 5 km, and measurements at 100 km are only \(\sqrt{10} \approx 3.2\times\) stronger than at 10 km.
For a fixed camera, the ratio of signal (sagitta in pixels) to measurement uncertainty (typically ~1 pixel) determines measurement quality. While higher altitude always improves this ratio, the improvement is gradual rather than dramatic. This explains why the method remains viable across a wide altitude range rather than requiring specific threshold altitudes.
Methodology
Physical Setup
We establish a world coordinate system with origin at Earth’s center, z-axis pointing toward the North Pole, and x-y plane defining the equator. An observer at altitude \(h\) above the surface sits at position \((0, 0, R+h)\) where \(R\) is Earth’s radius. The horizon circle consists of points on the surface where sight lines from the observer become tangent to the sphere.
Camera Coordinate System
The camera has its own coordinate system with origin at the lens, z-axis along the optical axis (viewing direction), y-axis pointing upward in the image, and x-axis pointing rightward. The camera’s orientation in world space is described by three rotation angles:
Pitch (\(\theta_p\)): Rotation about the x-axis (looking up/down)
Roll (\(\theta_r\)): Rotation about the z-axis (image tilt)
Yaw (\(\theta_y\)): Rotation about the y-axis (compass heading)
The rotation matrix \(R_{\text{cam}}\) combines these three rotations:
This matrix transforms world coordinates into camera coordinates through \(\mathbf{p}_{\text{cam}} = R_{\text{cam}} \mathbf{p}_{\text{world}}\).
Projection to Image Coordinates
The pinhole camera model projects 3D camera coordinates onto the 2D image plane. A point at camera coordinates \((x_c, y_c, z_c)\) projects to image coordinates \((u, v)\) through:
where \(f_x\), \(f_y\) are focal lengths in pixels (typically equal), and \((c_x, c_y)\) is the principal point (image center). These four parameters define the intrinsic matrix \(K\).
Complete Measurement Pipeline
Given a set of free parameters \(\{R, h, \theta_p, \theta_r, \theta_y, f_x, c_x, c_y\}\) (some may be fixed if known), we can predict where the horizon circle should appear in the image:
Generate points on the horizon circle in world coordinates
Transform to camera coordinates using \(R_{\text{cam}}\)
Project to image coordinates using the intrinsic matrix \(K\)
Compare predicted limb arc to observed horizon
The inverse problem—estimating unknown parameters from an observed horizon—requires optimization. We define a cost function measuring the mismatch between predicted and observed horizon geometry, then search parameter space to minimize this cost.
Parameter Bounds and Optimization
Physical constraints provide bounds on free parameters. Earth’s radius is approximately 6371 km (±50 km for various reference models). Altitude for aircraft photography ranges from 5-20 km. Camera pitch typically ranges from -90° to +90°, roll from -180° to +180°. Focal length can often be constrained from EXIF metadata to within ±10%.
Global optimization algorithms (differential evolution, basin-hopping, dual annealing) search this bounded parameter space to find the best-fit solution. Multi-resolution strategies for gradient-field optimization start with coarse image resolution (fast evaluation) and progressively refine to full resolution, helping avoid local minima in the cost landscape.
Uncertainty Quantification
Measurement uncertainty arises from pixel discretization, camera parameter uncertainty, and atmospheric effects. Bootstrap resampling provides empirical confidence intervals: we repeatedly resample the observed horizon points with replacement, refit the model to each bootstrap sample, and examine the distribution of fitted parameters. The standard deviation of this distribution estimates parameter uncertainty.
Alternatively, the Hessian matrix (second derivatives of the cost function at the solution) provides an approximate covariance matrix for the parameters, yielding uncertainty estimates from the optimization geometry itself. Both methods typically agree within a factor of two and provide order-of-magnitude uncertainty characterization.
Detection Methods
Three approaches exist for identifying horizon pixels in an image: manual annotation by a human observer, automated detection based on image gradients, and semantic segmentation using machine learning. Each trades off precision, automation, and robustness differently.
Manual Annotation
A human observer clicks points along the visible horizon, providing ground truth with typical precision of 1-2 pixels. This method achieves the highest accuracy when the horizon is visually clear, as humans excel at pattern recognition and can distinguish true horizon from atmospheric features or clouds. The limitation is labor—annotating a single image requires 30-60 seconds and does not scale to batch processing.
Sparse computation optimization enables efficient model fitting from manual annotations. Rather than evaluating the cost function across the entire image, we compute predicted limb positions only at the annotated pixel x-coordinates, comparing predicted and observed y-values. This reduces computation from ~10 million pixel evaluations to ~100 point evaluations, achieving 85× speedup with no loss in accuracy.
Gradient-Based Detection
Image gradients indicate transitions from sky to Earth, making gradient magnitude a natural horizon detector. The gradient-break method identifies the horizon as the y-coordinate of maximum vertical gradient magnitude for each image column. Savitzky-Golay smoothing reduces noise while preserving edge sharpness.
This approach works well for images with clean sky-to-ground transitions but struggles with atmospheric haze, cloud layers, or gradual transitions. The method is fully automatic and computationally efficient (typically 1-5 seconds), making it suitable for batch processing when scene complexity is low.
Segmentation-Based Detection
The Segment Anything Model (SAM) provides semantic segmentation without task-specific training. Given an image, SAM generates masks corresponding to distinct objects or regions. The horizon appears as a strong boundary between sky and ground segments, allowing robust detection even in complex scenes with clouds, terrain features, or atmospheric layers.
SAM’s computational cost is substantial (10-30 seconds on CPU, 2-5 seconds on GPU) but its robustness to scene complexity often justifies this expense. The model’s ability to distinguish atmospheric features from the true planetary limb makes it particularly valuable for hazy or cloud-scattered images where gradient-based methods fail.
Method Comparison
Precision: Manual annotation > Segmentation ≥ Gradient-based
Automation: Gradient-based = Segmentation > Manual annotation
Robustness to complexity: Segmentation > Manual annotation > Gradient-based
Computational cost: Gradient-based < Manual annotation < Segmentation
For research requiring highest accuracy, manual annotation remains optimal. For automated pipelines processing clear horizons, gradient-based detection suffices. For robustness across varied scene complexity, segmentation provides the best balance despite higher computational cost.
Detection-Free Alternative
The gradient-field method (detailed separately) bypasses explicit detection entirely by optimizing model parameters to align predicted limb position with image gradient vectors across the entire image. This approach uses all available image information rather than reducing it to a 1D horizon curve, trading computational cost for improved robustness and precision.
Gradient Field
The gradient-field method optimizes model parameters by aligning predicted limb position with image gradients across the entire image, eliminating the need for explicit horizon detection. This approach uses all available gradient information rather than reducing it to a 1D detected curve.
Mathematical Foundation
Image gradients \(\nabla I(x,y) = (\partial I/\partial x, \partial I/\partial y)\) point perpendicular to edges—at horizon pixels, gradients point from sky (dark) toward ground (bright), or vice versa depending on scene lighting. The gradient magnitude \(|\nabla I|\) indicates edge strength, while the normalized direction \(\hat{g} = \nabla I / |\nabla I|\) specifies the orientation.
For a given set of model parameters, we predict where the horizon should appear in the image, generating a model limb curve \(\mathbf{r}_{\text{model}}(t)\) in image coordinates. At each point along this curve, we compute the inward-pointing normal vector \(\hat{n}_{\text{model}}\).
The cost function measures misalignment between image gradients and model normals:
where \((\cdot)^+\) denotes positive part (max(0, ·)). This flux-based cost automatically weights pixels by gradient strength—strong edges contribute more to the cost than weak edges, providing natural robustness to noise in uniform regions.
Directional blur enhancement applies Gaussian smoothing along the predicted limb tangent direction while preserving sharpness perpendicular to it. This distinguishes atmospheric gradients (which blur in all directions) from the true planetary edge (which remains sharp perpendicular to the limb), improving detection accuracy in hazy conditions.
Multi-Resolution Strategy
Multi-resolution optimization solves the cost landscape’s rugged structure. We begin at coarse resolution (image downsampled 8× or 16×), quickly finding the approximate solution. This coarse solution initializes optimization at medium resolution (4× downsample), which refines the parameters. Finally, full-resolution optimization achieves pixel-level precision.
This coarse-to-fine strategy has two benefits: (1) coarse resolution blurs away local minima, making global optimization more reliable, and (2) cost function evaluation is ~64× faster at 8× downsampling, accelerating the expensive initial search phase.
Advantages and Limitations
The gradient-field method requires no detection preprocessing—it works directly with raw image gradients. By using all pixels rather than a sparse detected curve, it potentially extracts more information from the image. The flux-based weighting naturally emphasizes strong edges without requiring manual threshold selection.
However, computational cost is substantial (10-30 seconds vs 1-5 seconds for detection-based methods) because the cost function must evaluate the predicted limb across many image pixels for each parameter set during optimization. The method also struggles with very low contrast scenes where gradient magnitude is weak everywhere, as it has no signal to align with.
The method performs best when the horizon is the dominant edge in the image. Complex scenes with strong non-horizon edges (terrain features, cloud boundaries) can confuse the optimization, though directional blur helps mitigate this issue.
Theoretical Connection
The gradient-field approach relates to active contour methods in computer vision, where a curve evolves to align with image features. It also connects to variational formulations of edge detection, which find curves maximizing a functional involving image gradients. The key difference is that our model curve has geometric constraints (it must be a valid horizon projection given camera parameters), whereas active contours have no such constraint.
This geometric constraint is both a strength and a limitation. It prevents the solution from collapsing to arbitrary edges in the image (a common problem for unconstrained active contours) but requires that the true horizon actually match the assumed spherical Earth geometry. Deviations from this geometry (atmospheric refraction, terrain roughness) introduce systematic errors.
References
Snyder, J. P. (1987). Map Projections: A Working Manual. U.S. Geological Survey Professional Paper 1395.
Torge, W., & Müller, J. (2012). Geodesy (4th ed.). De Gruyter.
Hartley, R., & Zisserman, A. (2004). Multiple View Geometry in Computer Vision (2nd ed.). Cambridge University Press.
Luhmann, T., et al. (2014). Close-Range Photogrammetry and 3D Imaging (2nd ed.). De Gruyter.
Szeliski, R. (2022). Computer Vision: Algorithms and Applications (2nd ed.). Springer.
Kirillov, A., et al. (2023). Segment Anything. arXiv preprint arXiv:2304.02643.
Young, A. T. (2006). Understanding astronomical refraction. The Observatory, 126, 82-115.
Bohren, C. F., & Fraser, A. B. (1986). At what altitude does the horizon cease to be visible? American Journal of Physics, 54(3), 222-227.