Underwater Stereo Rig Planner

Two flat-port action cameras under water: refraction-corrected field of view, stereo overlap and depth precision for any baseline, convergence angle and working distance.

Camera ACamera BStereo overlapIn-air frustum
Drag rotate · Wheel / pinch zoom · Shift-drag pan

Flat port vs dome port at these settings

Key distances along the rig axis

Advisories

    Stereo overlap vs working distance

    Depth precision σZ vs working distance

    Values by distance

    How the numbers are computed

    1. Flat-port refraction (Snell's law)

    Both cameras sit behind a flat window (their own lens cover, or the flat port of the dive housing). A ray at angle θw from the optical axis in water refracts to θa in air, with nw sin θw = sin θa. The lens can only accept rays up to its in-air half angle, so the in-water field of view is

    FOVwater = 2 · asin( sin(FOVair / 2) / nw )

    Since sin θa ≤ 1, no flat-port camera can see more than 2·asin(1/nw) ≈ 97° under water, whatever its lens. The glass thickness only shifts rays sideways by a few millimetres; it does not change the angles. Each boundary ray of the image is refracted individually, which is why the in-water frustum of a wide lens has rounded corners.

    2. Scale and focus

    Near the axis the port multiplies the focal length by nw (≈1.34), so the ground sampling distance at the centre of the frame is GSD = Z / (nw fpx), where fpx is the in-air centre focal length in pixels derived from the mode's field angles and projection model. Objects at distance Z appear at Z / nw, so a lens that focuses down to d in air focuses down to nw·d in water. Away from the axis the port adds pincushion-type distortion and lateral colour, which is why cameras must be calibrated in water, at the working distance, not in air.

    2b. The dome-port alternative

    A dome port whose centre of curvature sits on the entrance pupil passes every chief ray at normal incidence, so the in-air field of view, focal length and distortion are unchanged under water and there is no colour fringing from the port. The price is focus: the water–glass–air shell acts as a strong negative lens. Treating it as two spherical surfaces (outer radius R, inner radius R − t, glass index ng), the virtual image of an object at distance O from the dome centre lies at

    nw/(O − R) + ng/s₁ = (ng − nw)/R, ng/s₂ + 1/s₃ = (1 − ng)/(R − t) with s₂ = −(s₁ − t)

    For a thin shell this gives roughly 3 R from the glass (4 R from the centre) for an object at infinity, and closer still for nearer objects: the whole scene is compressed into a thin curved layer just outside the dome. A fixed-focus action camera with a 30–35 cm near focus therefore needs a dome of about 80–90 mm radius (a 6-inch dome is marginal, a 4-inch dome is too small) or a close-up lens, and at f/2.5–2.8 the curved virtual image leaves the frame corners soft. When the pupil is not at the centre of curvature the model traces each ray through both spherical surfaces exactly, which shows the mild distortion and field change that results.

    3. Where the two fields overlap

    With in-water half angle h in the plane of the baseline, baseline b and total convergence θ, each camera's footprint on a plane at distance Z spans Z·tan(h ± θ/2) either side of its own position. From this:

    Znear = b / (2 tan(h + θ/2)) — overlap begins
    Zfull = b / (tan(h + θ/2) − tan(h − θ/2)) — the two footprints coincide (100 %)
    Zcross = b / (2 tan(θ/2)) — optical axes cross
    Zfar = b / (2 tan(θ/2 − h)) — overlap ends (only when θ/2 > h)

    The 3-D view intersects the refracted frustums with the subject plane and clips the two polygons against each other, so the area and percentage shown in the tiles include the keystone effect of toe-in; the chart uses the width along the centreline, which is what the formulas above describe. Frame corners beyond the usable off-axis angle (65° by default) are folded back onto that angle before the intersection: behind a flat port nothing exceeds 49° anyway, but behind a dome a 122° fisheye reaches 80° at the corners, where the plane is seen at grazing incidence and the footprint would otherwise be a meaningless star shape.

    4. Depth precision

    A point seen from two cameras whose rays meet at angle γ, each ray carrying an angular uncertainty σα = σpx / (nw fpx), is located with

    σdepth = R · σα / (√2 · sin(γ/2)) σlateral = R · σα / (√2 · cos(γ/2))
    γ = 2 · atan( b / 2Z ) for a point on the rig axis, R ≈ Z

    For parallel cameras and small γ this is the textbook σZ = Z² σd / (f b) with disparity precision σd = √2 σpx. Depth precision degrades with Z² and improves linearly with baseline and focal length. Convergence does not change γ for a given point; it only changes which points both cameras see. Values are 1-σ for a single pair; bundle adjustment over many images and tie points does better than this, but the trends hold.

    5. Visibility

    Horizontal visibility V relates to the beam attenuation coefficient c by V ≈ 3.9 / c (Duntley). Image contrast falls as e−cZ; below ~25–30 % of the contrast at zero range, texture matching becomes unreliable, which is why benthic photogrammetry is usually flown at 1–3 m even in clear water.

    Assumptions

    • Thin flat port with the entrance pupil close to the window; the few millimetres between pupil and glass are neglected.
    • Both cameras identical, aligned in the plane of the baseline, with the same roll.
    • Manufacturer in-air field angles; fisheye-type modes are modelled with a stereographic projection for the frustum corners and centre focal length.
    • Quan & Fry (1995) refractive index; pressure neglected (+0.0014 at 100 m).

    Where the design rules come from

    • Flat-port limit, pincushion distortion and the "objects appear closer" effect: Menna, Nocerino, Fassi & Remondino 2016, Sensors 16:48; flat vs dome ports: Menna, Nocerino & Remondino 2017, ISPRS Archives XLII-2/W3.
    • In-water principal distance ≈ 1.34 × in-air for GoPro, calibrate in water, 0.1–0.3 px image residuals: Shortis 2015, Sensors 15:30810. Refractive geometry: Treibitz et al. 2012, IEEE TPAMI 34:51; Pinax model: Łuczyński et al. 2017, Ocean Eng. 133:9.
    • Refractive index of seawater: Quan & Fry 1995, Appl. Opt. 34:3477.
    • Depth precision σZ = Z² σ / (c B), 60–80 % overlap, convergent geometry vs matching: Dall'Asta et al. 2015, Sensors 15:7985; Luhmann et al., Close-Range Photogrammetry and 3D Imaging; Wenzel et al. 2013, ISPRS Archives XL-5/W1 (large intersection angles hurt matching; 3–7° gives noisy surfaces); Lowe 2004 (SIFT reliable within ≈30° of viewpoint change).
    • Stereo-video rigs: Shortis & Harvey 1998 (1.4 m base, 8.5° convergence, 5 m range: 3 mm lateral / 22 mm depth a-priori precision); stereo-BRUV standard of two GoPros 700 mm apart converged 7°: Langlois et al. 2020, Methods Ecol. Evol. 11:1401; base 150 / 400 / 800 mm compared, 800 mm best, 150 mm poor beyond 6 m: Boutros, Shortis & Harvey 2015, L&O Methods 13:224; review: Shortis, Harvey & Abdo 2009, Oceanogr. Mar. Biol. Annu. Rev. 47:257.
    • Reef SfM practice: Burns et al. 2015, PeerJ 3:e1077 (≈3 m altitude, 70–80 % overlap); Bayley & Mogg 2020, Methods Ecol. Evol. (1–2 m, 50–75 % overlap); Raoult et al. 2016, PeerJ 4:e1960 (GoPro stills at 2 Hz, > 60 % overlap); Young et al. 2017, PLoS ONE 12:e0175341 (GoPro 0.5–1 m altitude, 60–80 % overlap).
    • GoPro accuracy under water: Nocerino et al. 2019, ISPRS Archives XLII-2/W10 (RMSE ≈ 3.6 mm at 2 m, GSD 1.2 mm); parallel GoPro 11 pair with a 249 mm baseline that is the same in air and in the pool: Del Pizzo et al. 2024, IEEE MetroSea.
    Camera data and sources