Underwater perception · Sri Lanka

An underwater camera pod and a live software pipeline that give back the picture murky freshwater takes away. Built for inspecting dams, intakes and canals.

Working prototype, in progress: the modules are being built and brought up on the bench. Results so far are from simulation; real-water tests come next.

lights, one at a time
4
12 V 5 W, at the corners of the front face
clearer, in simulation
+18.5dB
10.6 → 29.1 dB PSNR, 1 m at 6 NTU
housing design depth
30m
dives stay at 2 m until the pressure tests pass
drops inside
0
well test, 2 m for 19 min, 18 Oct

01 — The problem

Murky water steals the picture

Rain and farming wash silt and clay into Sri Lanka's reservoirs and canals. In that water an ordinary camera sees little more than a grey-green fog, even a metre from the wall.

In our water model, light from a wall 1 m away at 6 NTU reaches the camera at about a tenth of its strength, one way (simulation). With the pod's own lights it also has to travel out to the wall first, so even less comes back.

  1. 01Backscatter lays a veil over the scene
  2. 02Forward scatter softens every edge
  3. 03Attenuation dims the light, blue first
CAM 016.0 NTU · 1.00 m

02 — Switched lights

Four lights, one at a time

Four lights sit at the corners of the front face, 125 mm from the lens, and take turns. The wall looks the same from every light. The particles do not: each one lights up differently and casts its glow in a different place.

  1. 01Each frame is lit by one light
  2. 02The wall looks the same; the particles do not
  3. 03One cycle of four frames separates the two
CAM 01LIGHT CYCLE · 4 FRAMES

03 — Sonar range

Sound measures what light cannot

How much light the water takes depends on how far it travels. The sonar sends out sound, which murky water does not stop, and times the echo from the wall.

  1. 01Sound is not stopped by murky water
  2. 02The echo time gives the distance z
  3. 03z says how much water to undo
z = 0.00 mPING2RANGE

04 — The water

Measure the water, don’t guess it

A turbidity probe on the pod reads the water. Once it is calibrated for the water at the site, its reading and the sonar's distance give the physics stages the inputs to estimate how much haze to remove and how much light to give back.

At 6 NTU the water model gives β = 2.24 / 2.27 / 2.69 per metre for red, green and blue (placeholder calibration until the tank test). With our own lights the light travels out to the wall and back, a path of about twice the distance (2z), so the range for our lamps is still to be measured.

  1. 01The probe reads turbidity in NTU
  2. 02Spikes are rejected, the readings averaged
  3. 03NTU becomes attenuation for each colour
0.0 NTU0.310.150.31β (1/m) R · G · BS-DTS210NTU → β

05 — How it works

Physics first, one step at a time

OXYS does not guess what the scene should look like. Light from the wall is dimmed and blurred on the way, and a haze of scattered light is added on top. Each stage rests on its own published work: the attenuation and backscatter model of Akkaynak and Treibitz, the forward-scatter models of McGlamery and Jaffe, multi-flash imaging for the switched lights and marine-snow filtering for the particles. With the distance and the water measured, each effect can be taken back out in turn.

  1. Capture

    12-bit raw frames from the camera, each tagged with the light that was on.

  2. Haze removal

    Subtracts the backscatter veil, using the range and the water parameters.

    + range z and water β

    Based on Akkaynak & Treibitz 2018 [1]; Sea-Thru 2019 [2]

  3. Light-state fusion

    Combines one cycle of the four lights and marks the particles that move between them.

    Based on multi-flash imaging, Raskar et al. 2004 [3]

  4. Particle filter

    Removes drifting particles using the last few outputs.

    Based on Cyganek & Gongola 2018 [13]; Hodne et al. 2022 [16]

  5. Correction

    Undoes the blur and the light lost on the way, with noise kept in check.

    + range z and water β

    Based on blur: McGlamery 1980, Jaffe 1990; light lost: Akkaynak & Treibitz 2018 [1]

  6. Output

    The restored view on screen and on disk, with a confidence map planned.

The pod measures; the topside PC restores. A Raspberry Pi 4B in the tube reads the sonar and the turbidity probe, switches the lights and sends everything up the 30 m tether. Status: the stages run in Oxys Vision, our simulator, and are being ported to the runtime and brought up on the bench; how the whole chain performs in real water is still to be measured.

06 — Results so far

From fog back to detail

Drag the divider. On the left is what the camera would record of a wall 1 m away in 6 NTU water; on the right, the same frame after the correction stage.

Camera
10.6 dB
Restored
29.1 dB

PSNR against the clear image. This is a simulation: the same physics model makes the murky frame and removes it, with 1 % camera noise. Real tank tests at several turbidities come next.

Simulated view of the pod's rear lid at 1 m in 6 NTU water: Camera · 6 NTUSimulated view of the pod's rear lid at 1 m in 6 NTU water: OXYS restoredCamera · 6 NTUOXYS restored