You are building a two-camera stereo rig for underwater biomass estimation: salmon length and depth from a submersible or a cage-mounted housing. The camera side is solved ground, because module driver support and hardware sync for stereo capture each have their own guide: IMX219 and IMX477 on Jetson: built-in driver support and stereo sync and Sync two CSI cameras on Jetson for stereo SLAM. This guide stays on the optics. Underwater, two effects a land rig never meets set the lens: a flat port refracts every ray, acting as a 1.33x focal-length multiplier, and the water column absorbs red light within a few metres. Below are the mount, the focal length through the port, a distortion budget for stereo matching, an f-number and lighting plan, and the stereo baseline, with arithmetic you can re-run for your own cage geometry.
Will a C-mount lens fit a CS-mount camera module?
Yes: a C-mount lens fits a CS-mount camera with a 5 mm adapter ring, because the C-mount flange sits 17.526 mm and the CS-mount flange 12.50 mm from the sensor, and the adapter makes up the 5.026 mm difference.
Most fixed machine vision lenses are C-mount, while board-level stereo modules commonly carry CS-mount barrels, so the adapter is a standard fixture on these builds. The thread itself is a defined standard: C-mount lens thread and diameter: the 1 inch-32 UNS standard covers its geometry. Two rules keep the pair honest: buy the same adapter for both cameras, and lock focus before you thread-lock the ring, because every turn of a lens barrel shifts focus slightly. If the camera variant is still open, CS mount vs S-mount camera variant: choose at order time explains why the mount belongs on the order form, not in a later parts hunt.
What focal length covers fish at 1 to 3 metres?
On a 1/2.3-inch stereo sensor with a 6.3 mm width, an 8 mm lens is the pick: about 43° of horizontal field of view in air, 32° after the port, spanning 1.1 m of water at 2 m and 1.7 m at 3 m, room for an 0.8 m salmon.
Solve the focal length backwards from the span. The water-side half-angle is atan(0.55 m / 2.0 m) = 15.4°. Snell's law converts it to the air side of the port: sin(theta_air) = 1.33 x sin(15.4°) = 0.353, so theta_air = 20.7°. The focal length that just covers it is half the sensor width over the tangent: 3.14 mm / tan(20.7°) = 3.14 / 0.378 = 8.3 mm, so any lens at or below about 8 mm works and a longer one does not. An 8 mm lens back-checks to 15.96° in water, a 1.14 m span at 2 m and 1.72 m at 3 m.
The calculator above runs the air-side step; convert the angles through the port as shown, or multiply focal length by 1.33 when you reason in widths. For the full derivation, How to choose a machine vision lens focal length and Lens field of view: why sensor size and focal length set it carry it end to end.
The 8 mm slot is filled by the LS-FFL-1582, a 2/3-inch C-mount FA lens with a 57.6° field of view, a 6-10 MP resolution rating and an 8-11 mm image circle.
- Sensor format
- 2/3"
- Mount
- C-mount
- Resolution
- 6-10 MP
- Image circle
- 8-11 mm
A 7.9 mm sensor diagonal sits inside an 8-11 mm image circle with margin, so the corners stay lit. The sensor, lens, working distance and field of view sit in the classic triangle below.
How much does a flat port change the field of view?
A flat port multiplies the lens's effective focal length by the refractive index ratio of water to air, about 1.33, so an 8 mm lens frames like roughly a 10.6 mm lens in air, and it also caps the in-water field of view just under 98°.
Three consequences follow. First, wide angles shrink: a 43° air-side horizontal view becomes 32° in water, which is why the 8 mm choice above behaves like a 10.6 mm lens. Second, the port has a hard ceiling: rays arriving from water more than 48.8° off the port normal are totally reflected and never reach the sensor, so no flat-ported camera sees wider than about 98° in water, and edge rays near that limit carry growing non-linear distortion plus chromatic smear, because water's index shifts about 1% from blue to red. Third, the port makes each camera a non-single-viewpoint system: Underwater stereo camera calibration: refraction vs the pinhole model shows why the pinhole model survives as a fitted approximation and where it stops.
The dome-port alternative sends rays through glass nearly normal to the surface when the dome's centre of curvature sits at the lens's entrance pupil, so the air-side field of view carries into the water almost unchanged. You pay in mechanical precision. The decision is clean: at 32° of in-water view, take the flat port, because it is cheaper, simpler to seal, and fully absorbed by an in-water calibration. Move to a dome when you want more than about 60° in water: 60° already demands an 83° air-side lens, and 70° demands 99°, which is fisheye territory and hostile to stereo matching.
How much lens distortion is too much for stereo matching?
Keep geometric distortion under about 3% for stereo matching, and under 1% when you want the lens, not the calibration, to be the trusted part of the length measurement.
Rectification remaps both images onto common epipolar lines before matching, and heavy barrel distortion concentrates that remap at the frame edges, where interpolation softens exactly the texture a disparity search needs. Put a number on it: 3% distortion displaces a corner pixel by 0.03 x 3.14 mm = 94 µm, which is 61 pixels on a 1.55 µm sensor, so the calibration must absorb a 61-pixel warp perfectly for edge matches to hold. A lens arriving under 1% starts from a 20-pixel warp instead. When you read lens data sheets, read the geometric distortion value, not TV distortion: Geometric vs TV distortion: read lens datasheets for measurement explains the difference, and Machine vision lens distortion: pincushion, barrel and calibration covers how calibration removes what is measured.
The low-distortion end of the range is filled by the LS-FFL-0567, which prints <0.3% distortion with a 16 mm focal length, a 1.1-inch format, an F2.8-22 range and a 20 MP resolution rating. A 16 mm focal length behaves like 21 mm in water on this sensor, framing about 0.9 m across at 3 m and 1.2 m at 4 m: the low-distortion answer when the fish hold farther out than the planned 1-3 m.
What f-number and lighting work at depth?
Start at f/2.0 and stop to f/4 once you add light: through the port the lens acts like a 10.6 mm lens, and at f/4 it holds about +/-0.44 m of depth of field at 2 m, while each closed stop halves the photons you replace with strobed blue-green light.
Depth of field first. With a two-pixel circle of confusion (3.1 µm on this sensor):
At f/4: 2 x 4 x 0.0031 mm x (2000 mm / 10.64 mm)^2 = 0.0248 x 35 300, about 880 mm, or +/-0.44 m around the 2 m focus. At f/2 you get half that, +/-0.22 m. Salmon spread through 1-3 m, so f/4 with added light is the working point; Aperture f-number and depth of field in machine vision cameras carries the full derivation.
The light budget: water strips red first, with most red gone within about 5 m even in clear ocean water, and turbid farm water turning green sooner. Match the lamp to the water, near 480 nm in clear water and near 520 nm in greener coastal farm water, and use monochrome sensors, which gain roughly a stop by dropping the Bayer color filter array.
Motion sets exposure. One pixel of blur at 2 m is 1144 mm / 4056 px = 0.28 mm per pixel, so a fish moving 1 m/s needs 0.28 mm / 1000 mm/s, about 280 µs. Run 250 µs (1/4000 s) and pulse the LEDs for exactly that window from a strobe controller, which multiplies light at the sensor without multiplying heat or average power. For why a lower f-number is the cheapest photon source of all, see M12 lens light gathering: pick a lower f-number, same focal length; for why to lock exposure and iris by hand underwater, see Auto exposure vs iris control: which one the camera sets.
How wide should the stereo baseline be?
Set the baseline near 120 mm for fish between 1 and 3 m: both cameras' fields fully overlap beyond about 0.2 m, disparity at 2 m sits near 410 pixels, and half a pixel of matching error moves depth by under 3 mm.
At B = 120 mm and Z = 2000 mm: d = 10.64 x 120 / 2000 = 0.64 mm, or 412 pixels at a 1.55 µm pitch; a 0.5-pixel matching error gives delta_Z = 2000^2 x 0.00078 / (10.64 x 120), about 2.4 mm. That is far finer than the calibration residual, which tells you the baseline is generous for biomass work at this range: disparity resolution is not the limiting error, calibration is. The near-overlap limit is (B/2) / tan(15.96°) = 60 / 0.286, about 0.21 m, comfortably inside the fish range. A useful bracket is to keep B between 1/20 and 1/10 of your mid-range distance; 120 mm is 1/17 of 2 m.
Two related reads: Stereo depth scale factor and focal length: read them per camera for pulling per-camera intrinsics out of the in-water calibration instead of trusting nominal focal length, and Wide baseline stereo camera selection for depth mapping if your range stretches past 5 m and the baseline has to grow. The calibration accuracy itself has its own guide in Focal length from camera calibration: accuracy you can trust.
What must the housing and ports get right?
Seal, port and pressure make or break the calibration: use one flat port per camera, both machined flat and parallel, keep every cable gland and connector inside the rated pressure boundary as one assembly, and calibrate at working depth because pressure bows the port.
A port that flexes a fraction of a millimetre under pressure shifts the very distortion your in-water calibration froze, so calibrate the assembled rig at the depth it will run, in the cage or a pressure tank, and re-check after any port, gland or lens change. Keep the inside dry: condensation on the inner face of a port is the most common killer of otherwise healthy underwater rigs, so assemble over dry nitrogen or with desiccant inside.
Rate the assembly, not the parts. A depth-and-time immersion rating belongs to the housing with its specific ports and glands, and it says nothing about hose-down or corrosion performance; if the rig is washed between deployments, NEMA 4X versus IP66 ratings explains why those are separate tests you rate for separately.
What should you order for a two-camera biomass rig?
For a 1-3 m biomass rig, order two of the same 8 mm fixed lens, one 6-15 mm varifocal of the same mount to fix the focal length in a test tank first, green strobed lights with a controller, and the 5 mm C-to-CS adapters if your camera barrels are CS-mount.
Three fixed C-mount candidates, from the 2/3-inch wide angle to the 1.1-inch low-distortion glass:
| Specification | LS-FFL-1582 | LS-FFL-0602 | LS-FFL-0567 |
|---|---|---|---|
| Flange back | 17.526 mm in air | – | 17.526 mm in air |
| Back focus | 11.5 mm in air | – | 22.4 mm (min) |
| Aperture | 1:2.8~16 | F2.4 Manual iris | F2.8-22 |
| Focal length | 8 mm | 8.5 mm | 16 mm |
| Distortion | <0.1% | <0.7% | – |
| Resolution | 10 MP | 10 Megapixel | 20 Megapixel |
| Format | – | 1" | 1.1" |
| M.O.D. | – | 0.1 m | 0.1 m |
| Filter thread | – | M77 x P0.75 | M35.5 x P0.5 |
| Price | $309.00 | $429.00 | $679.00 |
All 3 share: Mount C-mount. Values as printed in each product's data sheet; open a part for its drawing and full specifications.
For 1-inch-class sensors the LS-FFL-0602 is an 8.5 mm C-mount lens with a 10 MP resolution rating and an 11-16 mm image circle. Decisions by case:
- Fish at 1-3 m, flat ports: two 8 mm lenses at f/4, a 120 mm baseline, strobed green light, in-water calibration. This is the default build.
- Fish holding at 3-4.5 m: two 16 mm low-distortion lenses; disparity at 3 m grows to about 550 pixels, so depth precision improves further.
- Prototype first: dial the geometry in the tank before the fixed pair arrives. The LS-CTV-0135 is a 6-15 mm varifocal in a 2/3-inch C-mount barrel with a 3 MP resolution rating.
- Type
- CCTV varifocal
- Sensor format
- 2/3"
- Mount
- C-mount
- Resolution
- Up to 3 MP
A 3 MP rating finds geometry fast; confirm the final numbers with the fixed pair.
- Counting and scene coverage rather than measurement: a dome port with a genuinely wide lens, accepting the rectification cost.
- Prefer to buy the stereo pair as a unit? 3D sensors lists factory stereo and structured-light cameras; submersion is outside those ratings, so ask us about housings before you commit.
When the 8 mm answer is wrong
Turbid water below about 1 m of visibility defeats any focal length: cut the working range, let lighting dominate, and re-run the focal-length arithmetic at the new distance. Fish regularly closer than 0.2 m fall inside the stereo overlap limit, so shorten the baseline rather than widening the lenses. And a genuine requirement for more than about 60° in water belongs behind a dome port with its own centering precision, not behind more lens.
Before ordering, check:
- Two identical lenses, same model, both set to the same f-stop before calibration.
- Sensor diagonal (7.9 mm for the 1/2.3-inch class) inside the lens's printed image circle.
- C-to-CS adapters on both cameras, matched and locked after focusing.
- Ports as a matched, parallel pair; pressure-test and calibrate at deployment depth.
- Light band matched to your water, near 520 nm for green farm water and near 480 nm for clear, strobed and off-axis.
- Baseline between 1/20 and 1/10 of mid-range: 120 mm at a 2 m mid-range.
Build the full rig in the lens configurator, filter candidates in the lens finder, browse machine vision lenses and CCTV lenses, or run your water's numbers past us on the contact page — expert support comes with every order.
Questions
Can you calibrate the stereo rig in air and deploy it underwater?
No. The flat port's refraction changes each camera's effective focal length by about 33% and adds angle-dependent distortion that a pinhole model cannot hold, so an in-air calibration mis-scales every depth by roughly that factor. Calibrate the assembled rig, ports and lights in place, in water, at the depth and pressure you will run at, and re-check after any port or lens change.
Is a fisheye lens usable for underwater stereo measurement?
For counting yes, for measurement rarely. A fisheye such as the LS-CTV-0028 is a 1.5 mm M12 fisheye for 1/2-inch sensors with a 5 MP rating; its heavy barrel distortion must be unwrapped before rectification, which resamples the edges and costs the sub-pixel accuracy that length measurement needs. Keep fisheyes behind dome ports for counting and scene coverage, and use a low-distortion wide angle when millimetres matter.
Why do underwater rigs use green light instead of white?
Water strips red first: in clear ocean water most red is gone within about 5 m, and turbid farm water goes green even sooner. Blue-green near 480 nm travels furthest in clear water, while greener coastal farm water carries green near 520 nm better. Match the LED band to your water and pair it with monochrome sensors, so no photons are spent on wavelengths that never come back.
Do both cameras need the same lens?
Yes. Buy two of the same model and set both to the same f-stop. Stereo software can hold slightly different per-camera focal lengths, but mismatched lenses give mismatched sharpness and exposure across the pair, and any later aperture change shifts focus and distortion enough to matter at sub-pixel disparity. Treat the pair as one sealed unit after calibration.
How much depth error does one pixel of disparity error cause at 3 m?
About 11 mm with the worked example's geometry. Disparity at 3 m is f_effective x B / Z = 10.64 mm x 120 mm / 3000 mm = 0.426 mm, or 275 pixels at the 1.55 µm pixel pitch; one pixel of error is 1/275 of the range, so the depth error is 3000 mm / 275, roughly 11 mm. Calibration and refraction residuals, not disparity resolution, dominate the error budget at this range.

