3D visionTroubleshooting

Noisy stereo plane detection at close range: the settings to fix

Fix noisy stereo plane detection at close range: HD2K resolution, an explicit minimum depth distance, confidence 95, and a ±5 mm marker cross-check.

LumaSpec Vision12 min read Share on LinkedIn

On this page 9 sections
  1. 01What to change first
  2. 02The physics is on your side at close range
  3. 03Set the minimum distance explicitly
  4. 04Raise the confidence threshold, keep the modes
  5. 05Your yardstick is noisy too: 44 pixels of marker
  6. 06When passive stereo is the wrong tool at this standoff
  7. 07Keep it 2D: a mono camera beats depth fusion at this scale
  8. 08Bench checks and the decision per case
  9. 09Questions

A 25 mm ArUco marker at roughly 400 mm from a stereo depth camera, plane detection turned on to settle the marker orientation, and a depth readout that jumps around or disagrees with the marker by millimeters. That is a settings problem before it is a hardware problem. At that standoff the stereo geometry itself delivers sub-millimeter per-pixel depth, so noisy planes at close range almost always come from three places: a resolution setting that gives the matcher too few pixels, a near limit left at its default so matching happens at the edge of the search, and a confidence threshold low enough to keep every bad match.

This guide gives the settings to change, the numbers behind them, a realistic tolerance for cross-checking marker against plane, and the point at which you switch to structured light or a plain mono camera.

What to change first

Three settings carry almost all of the improvement, and two you already have right. Work through them in this order:

Parameter You have Change to Why
camera_resolution RESOLUTION.HD720 RESOLUTION.HD2K More pixels raise the focal length in pixels; depth noise falls and the marker span grows
Minimum distance (an initialization parameter, beside camera_resolution) Default 200 mm The working plane lands mid-search instead of on the near edge
confidence_threshold 10 95, or 80 if the plane thins out Discards mismatched pixels instead of keeping them
sensing_mode SENSING_MODE.STANDARD Keep Fill modes interpolate depth; a fit on invented values is biased
depth_mode DEPTH_MODE.QUALITY Keep The accuracy-first mode; frame rate is not your constraint on a static scene

REFERENCE_FRAME.CAMERA, UNIT.MILLIMETER and FLIP_MODE.OFF are already correct for a fixed rig measuring a marker straight ahead. The same near-edge failure shows up in whole point clouds, and noisy stereo point cloud fixes: thresholds, sensing mode, depth range walks the same levers from the cloud side.

The physics is on your side at close range

Stereo depth noise grows with the square of range, so close in is where the geometry is at its best, not worst:

d = f × b / z δz = z² × δd / (f × b)

d is disparity in pixels, f the focal length in pixels, b the baseline, z the range, and δd the disparity matching error — plan on 0.2 px for subpixel matching in a quality mode and 0.5 px when matching gets hard. Take example values you can read from your own calibration file: f = 700 px at the HD720 setting and f = 1190 px at the 2K setting, because focal length in pixels scales with the column count, with a 120 mm baseline at z the working distance.

  • Disparity at HD720: d = 700 × 120 / 400 = 210 px.
  • Depth noise at HD720: δz = 400² × 0.2 / (700 × 120) = 32,000 / 84,000 = 0.38 mm per pixel (0.95 mm at δd = 0.5 px).
  • Depth noise at the 2K setting: δz = 400² × 0.2 / (1190 × 120) = 32,000 / 142,800 = 0.22 mm per pixel (0.56 mm at δd = 0.5 px).

The resolution change alone is worth about 40 % less depth noise, and a RANSAC fit over roughly 10,000 inliers averages 0.22 mm down to 0.22 / √10,000 ≈ 0.002 mm. Random per-pixel noise cannot explain millimeter scatter at this range. When you see it, the causes are the near search limit, low resolution and kept mismatches, in that order; calibration follows if those are clean. The baseline term is the one you cannot set in software — choosing a stereo camera baseline distance covers how it trades against field of view.

Set the minimum distance explicitly

Depth matching searches disparities up to a maximum, and the minimum distance is what maps onto that widest disparity: it is the near edge of the search. Leave it at a default aimed at room-scale work and one of two things happens at the working plane. Either the true disparity — about 210 px in the example above — sits at the very edge of the search, where matches are made against truncated windows and come back weak, or close points fall outside the search entirely and return junk or nothing. The setting lives in the initialization parameters, in the same block as camera_resolution. Set it to 200 mm so the working plane lands mid-range with margin on both sides.

Test it with a matte card at the standoff: after the change, the hole count in the plane at confidence 95 should drop sharply. Objects closer than the sensor can match tend to look like noise rather than absence, which is exactly the symptom described in depth camera minimum range: why close objects look like noise.

Raise the confidence threshold, keep the modes

On this family of depth SDKs the confidence map runs 0 to 100, with 100 fully trusted, and the threshold discards everything below it. At confidence_threshold = 10 you are keeping nearly every match, good and bad. Interior lighting on a plain surface manufactures exactly the low-confidence mismatches you are admitting to the plane fit. Work at 95; if the plane thins out too far, step down to 80 and stop there.

Two of your settings are already correct. SENSING_MODE.STANDARD leaves holes where the matcher failed, which is what you want: fill modes interpolate across the holes, and a plane fit on interpolated values reports the interpolation, not the surface. DEPTH_MODE.QUALITY is the accuracy-first mode — keep it.

Interior lighting is its own lever. If the live image is dim or grainy at the marker, set exposure manually instead of leaving it automatic, and query the range the API accepts before writing a value — querying a 3D camera exposure range from the API shows where that setting lives.

Your yardstick is noisy too: 44 pixels of marker

Before concluding the plane is significantly off, price the reference. A 25 mm marker at the standoff spans f × 25 / 400 pixels: 44 px at the HD720 example focal length, 74 px at the 2K example. A planar marker range error scales roughly with range × corner error / span, and 0.5 px of corner error gives:

  • HD720: Z × 0.5 / 44 ≈ 4.6 mm of Z noise in the marker pose.
  • 2K setting: Z × 0.5 / 74 ≈ 2.7 mm.

At HD720 both instruments carry several millimeters of Z noise, so a disagreement of that size is not evidence of a bad plane. Compare against a ±5 mm tolerance at HD720 and ±3 mm at the 2K setting, and average the marker pose over ten frames, which tightens the marker side by √10 ≈ 3×. Z is the marker solve's weakest axis by construction — ArUco Z axis distance error: fix the marker solve first covers why — and 25 mm is near the small end for depth fusion, as minimum object size for 3D depth camera detection works through. If the gap survives good settings and frame averaging, the residual is calibration or the depth-to-marker extrinsics: start with poor stereo depth quality: fix calibration and focus mismatch first.

When passive stereo is the wrong tool at this standoff

None of the settings above fixes a textureless surface. A passive matcher needs image structure to correlate, and a plain desk, painted wall or bare metal gives it none — the plane stays sparse and noisy at any resolution because the matches do not exist to be kept. Bench test it in one minute: tape a printed random-dot sheet on the surface or aim a projector at it. If the plane cleans up, texture was the limit and an applied or projected pattern is the quick fix.

If the surface must stay bare, the pattern has to come from the sensor. Structured light projects its own, which is why it holds up on untextured planes. Two paths sit in the 3D sensors category: the MV-DLS300P-04, a laser galvanometer stereo camera, and the MV-DPS200P-02, a projected structured-light camera.

3D sensorsHikrobot MV-DLS300P-04 Laser galvanometer stereo cameraMV-DLS300P-04
Type
Stereo / structured light
$16,579.00 · quotedView and quote
3D sensorsHikrobot MV-DPS200P-02 Projected structured-light 3D cameraMV-DPS200P-02
Type
Stereo / structured light
$8,829.00 · quotedView and quote

For a fixed-standoff flatness check, a laser profiler trades the 2D image for height profiles — the MIS-DP3850-01P is the 3D laser profile sensor to compare.

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

A time-of-flight camera fills the whole frame at once, but its accuracy is class-typically near 1 % of range — about 4 mm here — which is coarser than the per-pixel stereo figure you already have. The ToF option is the MV-DT01WMU: the right answer for presence and coarse volume, not for millimeter planes.

3D sensorsHikrobot MV-DT01WMU ToF sensing cameraMV-DT01WMU
Type
Depth / ToF camera
Price on requestView and quote

At even shorter standoffs the trade-offs shift again; close range depth camera for 1 mm resolution at 5-15 cm covers that regime.

Keep it 2D: a mono camera beats depth fusion at this scale

Your stated goal is disambiguating the marker orientation, and that needs a vote from the plane, not precision from it. Precision belongs to the marker solve, and the marker solve wants pixels — a dedicated mono camera puts hundreds of pixels on a 25 mm marker at the standoff instead of tens.

Worked example on a 12 MP camera. The LS-CMR-0166 is a 12 MP USB3 area scan camera with a 4000 × 3000 grid at up to 30 fps. A 1/1.7-inch sensor is about 7.5 mm on the long side, so 4000 columns put the pixel pitch at 7.5 / 4000 = 1.9 µm. With a 25 mm lens at the working distance the magnification is 25 / (400 − 25) = 0.067, the field of view is 7.5 / 0.067 = 112 mm, and the marker spans 4000 × 25 / 112 = 890 px. Marker Z noise is then Z × 0.5 / 890 ≈ 0.22 mm — about ten times better than the same marker on the stereo head, with no depth stream to tune.

Area scan cameras12 MP USB3 area scan camera, IMX226, 1/1.7" rolling shutter, 30 fps, 4000 × 3000 resolution (LS-CMR-0166)LS-CMR-0166
Sensor format
1/1.7"
Interface
USB3
Resolution
12 MP
Shutter
Rolling
$560.00View partBuild a system with it

Pick the lens with the same arithmetic for your own margin:

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

The area scan cameras category filters by mount, resolution and shutter, and the camera finder covers the stereo and 3D side. Decision: run the marker on the mono camera for pose, keep the stereo plane — after the settings above — as the orientation vote, or drop the depth camera entirely if the vote was all you needed.

Bench checks and the decision per case

Run these in one session, in this order:

  1. Matte, textured target at the standoff with RESOLUTION.HD2K, minimum distance 200 mm, confidence_threshold 95. The plane should come back dense, with holes only at edges and specular patches.
  2. Marker pose averaged over ten frames against the plane offset. Inside ±5 mm the system is healthy — the significant offset was two noisy instruments disagreeing inside their own noise.
  3. Plain-surface test with a projected or taped pattern. A cleaner plane means texture was the limit; the same noise means the surface needs structured light.
  4. If only the offset is wrong after all of the above, calibrate: the extrinsics between depth map and marker image are carrying the error.

The decision, per case:

  • Noisy but present depth at 40 cm: the settings fix it. Expect the plane offset to hold within about a millimeter after the three changes.
  • Textureless surface: passive stereo cannot do it at any setting; move to structured light or a laser profiler.
  • Sub-millimeter Z from the marker itself: a mono camera and a proper lens win outright at this scale.

Prevention is one line: write the near limit, resolution and confidence threshold into the rig configuration at project start, so every capture begins from the values you validated. From there, browse the 3D vision guides, start a parts list in the system configurator, or bring the capture and target numbers to us through the contact page — expert support is free with every order.

Questions

Is 40 cm simply too close for a stereo depth camera?

No. With a 120 mm baseline and 700 px focal length, per-pixel depth noise at that standoff is about 0.38 mm — the geometry is at its best close in. What breaks close in is the search: the true disparity sits near 210 px, the widest part of the range, so the near limit decides whether those matches happen at all. Objects past the near limit return holes or junk rather than smooth noise, which is the symptom to look for.

How closely should the plane depth and the marker depth agree?

Inside about ±5 mm at HD720 and ±3 mm at the 2K setting. A 25 mm marker at that standoff spans only 44 px at HD720, so its own Z estimate carries roughly Z × 0.5 px / span of noise — the plane is not automatically the guilty one. Treat agreement inside the tolerance as a pass and stop tuning. If the gap is wider on a textured surface with good settings, the leftover is calibration or the extrinsics between depth map and marker image.

Does a bigger marker help more than changing settings?

Do both, but the marker is the easier half. Doubling the marker from 25 mm to 50 mm doubles its pixel span and halves the Z noise of the pose — from about 4.6 mm to 2.3 mm at HD720 — with no throughput cost. The settings change still matters, because resolution improves the plane fit and the marker solve together. Order of spend: settings first, marker size second, hardware last.

Is it better to fill the depth map holes before fitting?

No. Fill modes interpolate across holes, so part of the fit runs on invented values that already assume a continuous surface — the plane offset inherits the interpolation, not the measurement. A fit on real points with the holes left in is cleaner: RANSAC simply ignores the gaps instead of smoothing them into the answer. Keep SENSING_MODE.STANDARD and spend the effort on confidence and resolution instead.

When is a structured-light camera the right replacement?

When the surface has no texture of its own. A plain desk, painted wall or bare sheet-metal panel gives a passive matcher nothing to lock onto, and no setting can create matches that do not exist. Test in one minute: aim a projector at the surface or tape a printed dot pattern on it — if the plane cleans up, texture was the limit and an applied pattern is the quick fix. Only buy hardware when the surface must stay bare.

Does confidence 95 throw away too much of the plane?

No. A plane is a huge target: even if the threshold keeps only a third of a 1280 × 720 frame, that is over 300,000 points, and a plane fit needs a few hundred. The averaging inside the fit rewards point quality over point count, so the fitted offset gets better, not worse. Watch the inlier count as you raise the value and stop where it stabilizes.