3D visionExplainer

Stream depth data over a network: bandwidth math and compression

The bandwidth math for streaming 16-bit depth data over your network, a worked example at 147 Mbit/s, and when to compress, crop or drop frame rate.

LumaSpec Vision8 min read Share on LinkedIn

On this page 9 sections
  1. 01How much bandwidth does a raw depth stream need?
  2. 02Will a 100 Mbit/s network carry an uncompressed depth stream?
  3. 03Which compression should you use for depth images?
  4. 04Can you just send 8-bit depth to halve the data?
  5. 05Which cameras stream depth over Ethernet, and what do they push?
  6. 06How many depth cameras can share one gigabit link?
  7. 07When should you stream raw instead of compressing?
  8. 08How do you size the link before ordering?
  9. 09Questions

A depth camera looks like any other node on the shop network until you start streaming its raw output. A VGA video-rate depth stream then turns out to need 147 Mbit/s, and a shared 100 Mbit/s link quietly becomes the bottleneck. This guide is for anyone wiring one of the 3D sensors to a host across a network — pick-and-place cells, volume stations, multi-camera rigs. You get the bandwidth formula, a worked example with the arithmetic shown, usable rates for common link classes, and a decision path: when raw passes, when to compress, and what each compression choice costs in fidelity and CPU.

How much bandwidth does a raw depth stream need?

A 640 × 480, 16-bit depth stream at 30 fps moves 18.4 MB/s — 147 Mbit/s before protocol overhead. Every later decision, compression, frame rate or camera count, scales from that number. Depth is pixels like any image, so one formula covers every stream you will size.

stream rate = width × height × bytes-per-pixel × 8 × frame rate usable link rate ≈ link rate × 0.94 (TCP/IP plus Ethernet framing) required compression ratio ≥ stream rate ÷ (usable link rate × 0.7)

Worked example, VGA depth at 30 fps, 2 bytes per pixel:

  • 640 px × 480 px = 307,200 px per frame
  • 307,200 px × 2 B = 614,400 B per frame
  • 614,400 B × 30 /s = 18,432,000 B/s ≈ 18.4 MB/s
  • 18,432,000 B/s × 8 = 147,456,000 bit/s ≈ 147 Mbit/s
Stream Inputs Rate
VGA depth, 15 fps 307,200 px × 2 B × 15 74 Mbit/s
VGA depth, 30 fps 307,200 px × 2 B × 30 147 Mbit/s
VGA depth, 60 fps 307,200 px × 2 B × 60 295 Mbit/s
720p depth, 30 fps 921,600 px × 2 B × 30 442 Mbit/s
VGA color, 30 fps 307,200 px × 3 B × 30 221 Mbit/s

The link itself also sets a latency floor that no frame rate fixes; why your camera's link bandwidth sets a hard latency floor covers that side.

Will a 100 Mbit/s network carry an uncompressed depth stream?

No — after Ethernet framing and TCP/IP headers, a 100 Mbit/s link delivers roughly 94 Mbit/s of payload, so a 147 Mbit/s raw stream cannot pass: queues grow, latency climbs and the camera ends up dropping frames. The 0.94 factor reflects header and framing overhead at full-size packets, and it leaves gigabit Ethernet near 940 Mbit/s usable.

Keep every shared link under about 70% utilization so bursts and other traffic have room. For Fast Ethernet the formula demands 147 ÷ (94 × 0.7) ≈ 2.2× compression, which rounds up to a practical 3:1:

  1. Compress 3:1 lossless → 49 Mbit/s, 52% of the link.
  2. Crop to a 320 × 240 ROI → a quarter of the data, 37 Mbit/s, 39%.
  3. Drop to 15 fps and compress 2:1 → 37 Mbit/s, 39%.

The budget-first method is the same one that fixes USB hubs that drop camera frame rate; only the link numbers change.

Which compression should you use for depth images?

Compress losslessly while measurements must survive the trip: plan on 2:1 to 4:1 from zlib-class DEFLATE on smooth depth maps, and expect depth-specific formats to beat that at similar speed. Lossy photo codecs are the wrong tool for depth.

Choice Typical ratio Depth edges Cost Use it for
Raw 1:1 Exact None Dedicated gigabit
zlib / DEFLATE 2:1–4:1 (planning range) Exact Low per frame First step on a tight link
Depth-specific lossless (RVL type) Above DEFLATE at similar speed Exact Low Several cameras, one link
Near-lossless quantization 7:1–16:1 Up to one depth level Low Visualization, tolerant roles
JPEG 10:1–20:1 False block edges Low Never for measurement
Video codecs (H.264 family) High, temporal Smoothed across frames Buffered encoder Viewing only

The 2:1–4:1 band is a planning range, not a data-sheet value: DEFLATE squeezes smooth 16-bit ramps far less than photographs. Published work on lossless depth compression reports several simultaneous depth and color streams passing inside a 500 Mbit/s budget, and near-lossless depth schemes quote 7:1 to 16:1. Video codecs add temporal prediction, which serves viewing and corrupts geometry; the comparison of video codecs lays out the families.

Can you just send 8-bit depth to halve the data?

Almost never: folding a 4,000 mm range into 8 bits gives 4,000 ÷ 255 ≈ 16 mm steps, so flat surfaces become terraces and each edge can jump a whole bin. At a 1,000 mm range the step is still 3.9 mm, too coarse for grasping.

Most SDKs deliver depth in millimeters as unsigned 16-bit values topping out at 65,535 mm, and folding to 8 bits discards exactly the resolution the sensor worked for. The one version that works maps a narrow window instead of the full range: a 300 mm slab over 255 levels gives 300 ÷ 255 ≈ 1.2 mm steps, usable for picking from a bin whose depth you know. Full-range 8-bit stays a preview trick.

Which cameras stream depth over Ethernet, and what do they push?

Standard-Ethernet 3D cameras — time-of-flight, structured light and logistics-volume models — all send depth as pixels × 2 bytes × frame rate, so the sizing formula applies to their streams unchanged. The receiving host needs matching network and CPU headroom; vision controllers are built for that job.

3D sensorsHikrobot MV-DT01WMU ToF sensing cameraMV-DT01WMU
Type
Depth / ToF camera
Price on requestView and quote
3D sensorsHikrobot MV-DPS200P-02 Projected structured-light 3D cameraMV-DPS200P-02
Type
Stereo / structured light
$8,829.00 · quotedView and quote
3D sensorsHikrobot MV-HLVS-16K100-L60 Line-scan 2.5D, 16K resolution, Sampling rate 120 kHz, Emitting area length 600 mmMV-HLVS-16K100-L60
Type
2.5D inspection
Price on requestView and quote

At the high-rate end sit laser profilers, which stream many profiles per second instead of frames; budget them with the same formula, using profile rate and points per profile in place of pixels per frame.

3D sensorsHikrobot MIS-DP3850-01P 3D laser profile sensorMIS-DP3850-01P
Type
Laser profiler
$12,379.00 · quotedView and quote

Before scaling the streams, sort the addressing: DHCP setup for a 3D camera covers the one-server rule when camera and host land on different subnets.

Three VGA 30 fps depth cameras need 3 × 147 = 441 Mbit/s, which is 47% of a gigabit link's roughly 940 Mbit/s usable rate — inside the 70% ceiling, with 658 − 441 = 217 Mbit/s to spare. Against the 94 Mbit/s usable on shared Fast Ethernet, the same total has no chance.

Add registered color streams and the picture flips: 3 × 368 = 1,104 Mbit/s overruns the link. Color tolerates lossy compression and depth does not, so squeeze the color side and keep depth raw or lossless. A saturated link announces itself as lost packets and horizontal streaks: GigE Vision packet loss: horizontal lines in live images shows the symptom, and three depth cameras dropping to low fps covers the one-at-a-time isolation test.

When should you stream raw instead of compressing?

Stream raw whenever a dedicated gigabit link carries the stream alone: the VGA 30 fps case sits near a sixth of usable bandwidth, costs no compression CPU at either end and cannot introduce artifacts into your measurements. Raw also leaves the camera-side host free for capture rather than encoding.

Compression earns its keep when the link is the constraint or the CPU has cycles to spare: shared Fast Ethernet, a disk-recording stream running beside the network feed — streaming camera images to disk at high frame rate — or an embedded host where contention already shows up as sustained recording FPS drops on a vision box.

Add every stream sharing the path, divide by the usable rate, and order the link class that keeps the total under about 70%: one VGA 30 fps depth stream plus its registered color stream is 147 + 221 = 368 Mbit/s, or 39% of gigabit — gigabit fits, Fast Ethernet does not.

  1. List every stream on the shared path: depth, color, control, and any other camera.
  2. Rate each one with the formula and add the totals.
  3. Divide by 0.7 for the usable rate you need: 368 ÷ 0.7 = 526 Mbit/s, which only gigabit-class hardware delivers.
  4. Give each high-rate camera its own NIC or VLAN so bursts never meet.
  5. Bench-test for ten minutes with switch port counters before cabling the cell.

The same switch-by-switch arithmetic scales to a whole cell; the industrial network bandwidth calculation guide works PLC-level traffic through it step by step.

Size the link once and streaming stops being a variable. Build the camera side in the system configurator, or contact the applications team with your stream list and we will check the budget with you. The 3D topic guides collect the rest of the networking fixes.

Questions

Does TCP or UDP matter for a depth stream?

The payload rate stays the same; only a few percent of header overhead differs. TCP retransmits lost packets, which backs the stream up on a lossy path, while UDP drops quietly and leaves reassembly to you. On a clean switched LAN either works; choose UDP only when you handle sequencing yourself.

Can Wi-Fi carry depth video for commissioning?

For a low-rate preview, yes: crop a small ROI and drop to 5-10 fps so the stream fits in tens of Mbit/s. A full VGA 30 fps raw stream needs 147 Mbit/s sustained, more than shop-floor Wi-Fi delivers reliably, so keep production streams on wired gigabit.

How do I measure what my stream actually uses?

Read the switch port or NIC byte counters across a fixed interval and divide by time. A camera pushing 18.4 MB in one second is running at 18.4 x 8 = 147 Mbit/s. Compare the measured value with the formula prediction; the small gap is header overhead.

How much latency does compression add?

DEFLATE-class and depth-specific lossless codecs add low single-digit milliseconds per VGA frame for encode plus decode, a small share of a 33 ms loop. Near-lossless quantization is similar. Video codecs buffer several frames for temporal prediction, so reserve them for viewing, not closed-loop guidance.