3D visionGuide

3D surface blob analysis for dents on tilted parts

Use 3D surface blob analysis to find dents and bumps on tilted or stepped parts, with reference fits, noise thresholds and defect sizing checks.

LumaSpec Vision12 min read Share on LinkedIn

On this page 11 sections
  1. 01Decide what counts as a surface defect
  2. 02Fit the reference from sound material
  3. 03Handle tilted and stepped surfaces explicitly
  4. 04Set thresholds from repeatability and acceptance limits
  5. 05Convert the threshold mask into measurable regions
  6. 06Work through a dent-sizing example
  7. 07Choose acquisition hardware before tuning filters
  8. 08Treat missing depth as unknown, not as a dent
  9. 09Verify performance across realistic variation
  10. 10Know when plane-based analysis is the wrong answer
  11. 11Questions

A dent can be clear in height data even when its grayscale appearance barely differs from the surrounding surface. The challenge is separating that dent from part tilt, intended steps and measurement noise. This guide explains how to build a reference surface, segment signed deviations and measure connected defect regions. It is intended for inspection teams developing repeatable pass/fail decisions from calibrated 3D height maps, rather than simply highlighting unusual pixels.

Decide what counts as a surface defect

3D surface blob analysis groups neighboring measurements according to their deviation from an expected surface. Negative deviations identify depressions; positive deviations identify raised features. You then measure each connected region instead of evaluating isolated pixels.

The reference is the central decision. A fixed height threshold may work when every part sits at the same height and orientation. A tilted part usually needs a fitted plane, while a stepped part needs separate references for its intended faces.

Reference approach Appropriate situation Main limitation
Fixed height Repeatably positioned, level surface Position changes appear as defects
Fitted plane Nominally flat face with variable tilt Cannot represent steps or designed curvature
Separate planes by face Several nominally flat terraces Boundaries require explicit handling
Registered nominal surface Intended curvature or complex geometry Registration and reference errors affect residuals

Define the defect before selecting the threshold. Specify its polarity, minimum relevant depth, footprint and location. A harmless tooling mark and a rejectable dent can have similar peak depths but different areas.

Also distinguish localized defects from broad shape errors. If an apparently flat surface bows across most of the inspection region, use the checks in diagnosing point-cloud plane curvature. Fitting away that bow could hide a genuine form defect.

Fit the reference from sound material

Start with calibrated coordinates in consistent physical units. Pixel indices alone are insufficient when you need defect area or volume, particularly if sampling varies across the field.

Select reference regions that should remain undamaged. Distribute them across the face so the fit is constrained in both lateral directions. A narrow strip can produce an unstable plane estimate across a much wider inspection area.

For a surface represented as height over lateral coordinates, a convenient model is:

z_ref(x, y) = a*x + b*y + c r_z = z_measured - z_ref h = r_z / sqrt(1 + a^2 + b^2)

Here, r_z is the vertical residual and h is signed distance to the plane. The coefficients a and b describe slope; c describes offset. Positive h denotes a bump when positive height points toward the exposed side of the part.

An ordinary least-squares fit minimizes vertical residuals. For measurement noise that acts in several coordinate directions, an orthogonal plane fit may be more appropriate. Whichever method you choose, verify its residuals on known-good material.

Exclude invalid depth samples and known features before fitting. Robust fitting can reduce the influence of isolated outliers, but it cannot reliably identify the intended plane when most available points belong to a defect or another face.

Save the fitted coefficients and reference-region coverage with each result. They help distinguish a genuine defect from a misplaced part or a failed reference fit.

Handle tilted and stepped surfaces explicitly

Subtracting the plane removes the expected height ramp caused by tilt. However, vertical depth and normal depth are not interchangeable on a sloping face.

For example, a face tilted by 30 degrees has a vertical-to-normal conversion factor of approximately 0.866. A vertical depression of 0.20 mm corresponds to a normal depression of about 0.17 mm:

normal depth = vertical depth * cos(tilt) normal depth = 0.20 mm * cos(30 degrees) normal depth ≈ 0.17 mm

State which direction defines the drawing requirement and inspection result. A threshold specified normal to the face must not be applied directly to uncorrected vertical residuals.

Unexpected tilt across the entire acquisition may indicate a coordinate or calibration problem rather than ordinary part placement. Follow the checks for a tilted laser-triangulation point cloud before compensating for it in software.

For stepped surfaces, label each intended face and fit its reference separately. Do not force one plane through multiple terraces. Otherwise, the intentional step becomes a large false blob, and the compromised fit can reduce sensitivity elsewhere.

Create a boundary exclusion band where mixed measurements or occlusion make edge data unreliable. Set its width from observed edge behavior, not an arbitrary percentage of the image. Record the excluded area as uninspected; it is not automatically acceptable material.

A moving local reference can follow gradual shape changes, but its window must be substantially wider than the defects being sought. If its spatial scale approaches the dent width, it can follow the depression and remove the signal.

Set thresholds from repeatability and acceptance limits

Measure noise using repeated scans of representative good parts with the production acquisition settings. Include dark, reflective and steep regions that the inspection must actually evaluate.

At each location, estimate temporal variation after applying the same alignment and reference-fitting process used in production. Separately examine persistent spatial bias, which repeated averaging will not necessarily remove.

A useful starting model is:

T_detection = k*sigma_repeat + B_allowance

Here, sigma_repeat is measured repeatability, k is a chosen margin and B_allowance covers residual bias or reference uncertainty. This is an engineering starting point, not a guaranteed false-alarm probability.

Suppose repeatability is 0.02 mm and the additional allowance is 0.03 mm. With a margin of 3:

T_detection = 3 * 0.02 mm + 0.03 mm T_detection = 0.09 mm

For dents, mark valid points where h < -0.09 mm. For bumps, use h > 0.09 mm. Keep the two masks separate so adjacent positive and negative features do not become one ambiguous region.

A three-standard-deviation threshold still produces excursions in a large image, even under an ideal Gaussian model. Real depth errors can also be correlated or contain outliers. Connected-region size and repeatability checks therefore remain necessary.

Detection and rejection thresholds serve different purposes. Detection should capture candidate geometry; rejection should implement the approved acceptance requirement. If the noise-based detection threshold is above the smallest rejectable defect, improve acquisition or reference accuracy rather than lowering the threshold without validation.

For line-based measurements, address laser-line extraction noise before trying to remove its effects with increasingly aggressive blob filters.

Convert the threshold mask into measurable regions

Run connected-component labeling on the valid threshold mask. On a rectangular grid, four-neighbor connectivity joins only edge-sharing pixels; eight-neighbor connectivity also joins diagonal contacts. Select one convention and retain it throughout validation.

For irregular point clouds, establish a justified neighborhood distance or resample onto a calibrated grid. A point-count threshold alone is not a physical-area threshold when sampling density changes.

Measure each connected region using quantities that answer the inspection requirement:

  • Footprint area in a declared coordinate plane.
  • Maximum signed depth or height.
  • Mean deviation over valid region samples.
  • Centroid and location relative to part features.
  • Length, width and orientation in the relevant surface frame.
  • Integrated volume relative to the chosen reference.
  • Valid-data coverage and contact with exclusion boundaries.

For uniform samples on a grid aligned with the reference plane:

A = N * dx * dy V_dent ≈ sum(max(-h_i, 0) * dx * dy)

Here, N is the number of selected cells and dx and dy are calibrated grid spacings. The volume estimate covers the selected region, not necessarily the full physical dent.

If you retain a grid in the original XY coordinates instead, vertical volume integration uses -r_z and XY cell area. Do not multiply normal depth by projected XY area and call the result a correctly compensated volume.

Morphological opening can remove small islands, while closing can connect nearby regions. Both alter measured geometry. Keep the original residual data, document every mask operation and verify that thin or closely spaced defects are not removed or merged.

Work through a dent-sizing example

Consider a nominally flat face inspected after alignment and resampling into a plane-based coordinate frame. Assume uniform grid spacing of 0.10 mm in both directions and the 0.09 mm detection threshold calculated above.

A connected dent region contains 240 valid cells. Its mean normal depression is 0.14 mm, and its maximum depression is 0.22 mm.

Cell area = 0.10 mm * 0.10 mm = 0.01 mm^2 Detected area = 240 * 0.01 mm^2 = 2.4 mm^2 Detected-region volume ≈ 2.4 mm^2 * 0.14 mm Detected-region volume ≈ 0.34 mm^3

Suppose an illustrative acceptance rule rejects a dent only when its maximum depth exceeds 0.18 mm and its detected area exceeds 1.5 mm². This region exceeds both limits and would be rejected under that rule. Those example limits are not recommendations for a particular part.

The reported volume excludes shallow material outside the thresholded boundary. Lowering the segmentation threshold would generally enlarge the measured footprint and change the integrated volume. Compare results only when reference fitting, thresholding and filtering remain consistent.

Sampling also matters. A feature 1.2 mm wide spans approximately 12 sample intervals at this grid spacing:

Samples across feature ≈ 1.2 mm / 0.10 mm = 12

That is a sampling calculation, not proof of optical resolution or measurement accuracy. Interpolation can produce a finer-looking grid without creating additional measured detail.

If acceptance depends on full dent volume, validate a boundary definition that includes the shallow shoulders. Do not assume the high-confidence detection mask also describes the complete defect boundary.

Choose acquisition hardware before tuning filters

The segmentation method applies to several acquisition approaches, but each must provide usable data over the required surface. Browse 3D sensors by acquisition type, then use the camera finder to narrow the hardware shortlist.

The MIS-DP3850-01P is a laser profile sensor candidate for evaluating a profile-based acquisition approach. Confirm the complete sampling, motion and measurement requirements before selecting it.

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

With a moving part, acquisition must preserve the relationship between lateral samples and travel position. Uneven motion or incorrect position scaling can stretch a blob and corrupt its area. Evaluate the actual scanning arrangement rather than assuming the output grid is geometrically uniform.

The MV-DPS200P-02 is a projected structured-light 3D camera candidate for evaluating an area-based acquisition approach. Confirm suitability for the surface and required acquisition conditions through application review.

3D sensorsHikrobot MV-DPS200P-02 Projected structured-light 3D cameraMV-DPS200P-02
Type
Stereo / structured light
$8,829.00 · quotedView and quote

Neither candidate is asserted here to include a particular surface-blob software function. Confirm data access, processing location and available measurement tools separately from the sensor's acquisition type.

Before ordering, establish the required field coverage, smallest relevant defect, depth repeatability, cycle time and acceptable missing-data fraction. Use the 3D camera working-distance guide when arranging the measurement geometry.

If dark material produces weak or incomplete depth, address stereo depth lighting and surface visibility where applicable. Software cannot recover a trustworthy dent profile from measurements that were never acquired.

Cameras3D sensors

Laser profilers and stereo 3D cameras

170 models · from $699.00

Treat missing depth as unknown, not as a dent

Invalid samples need a separate mask from measured height. Replacing missing depth with zero can create an artificial depression; replacing it with the fitted plane can hide a real defect.

Track missing-data coverage for the inspection region and for each candidate's neighborhood. If a potential dent intersects a large invalid patch, report an incomplete measurement or request another acquisition according to the inspection policy.

The guide to missing points in a 3D point cloud helps distinguish acquisition gaps from processing errors.

Small-hole interpolation may be acceptable for visualization, but measurement use requires validation against the smallest relevant defect. Keep the original validity mask even when interpolation is applied.

Edge-adjacent dents are particularly difficult. Occlusion can remove the deepest area, while mixed edge measurements can create extreme values. Neither an apparently shallow result nor a single deep sample is sufficient evidence without checking coverage.

Verify performance across realistic variation

Build a validation set that includes sound parts, known defects, allowed features and difficult surface conditions. Cover position and tilt variation as well as defects near steps and inspection boundaries.

Repeated scans of one stationary sample measure only part of the problem. Remove and replace parts to expose fixture and reference-fit sensitivity. Include the movement and acquisition timing expected during operation.

Record both missed defects and false rejects. A filter that removes every noisy island may also remove narrow dents; a reference that produces tidy residuals may be following broad damage.

Retain raw data and settings so failed decisions can be reproduced. Follow the guidance on recording depth data losslessly when building an offline validation set.

Check the following before releasing the inspection:

  • The residual sign agrees with a known dent and a known bump.
  • Coordinates and spacing use consistent physical units.
  • Reference regions remain valid across permitted part movement.
  • Intended steps are labeled or excluded explicitly.
  • Missing depth cannot silently become acceptable material.
  • Connectivity and filtering preserve the smallest required defect.
  • Area and volume use the declared coordinate convention.
  • Acceptance decisions remain stable across repeated placements.

Know when plane-based analysis is the wrong answer

A plane is not an adequate nominal model for a deliberately curved face. Use a suitable geometric model or registered reference surface, then evaluate deviations in a clearly defined direction.

Likewise, surface-blob thresholds are not automatically a surface-roughness measurement. Roughness requires its own filtering, evaluation length and parameter definitions. A method designed to identify localized dents can suppress or misinterpret fine texture.

If defects occupy most of the face, there may be too little sound material for an independent plane fit. If missing depth covers the critical region, a reliable sizing result may be impossible from that acquisition. In both cases, report the limitation rather than forcing a numeric answer.

For a hardware review, bring a representative height map, valid-data mask, defect dimensions and acceptance rule to application support. Start the camera configurator once those requirements are defined, so acquisition capability and the measurement method are selected together.

Questions

How does 3D surface blob analysis detect dents on tilted parts?

Fit the expected face and calculate each valid measurement's signed deviation from that reference. A consistent sign convention separates depressions from raised regions. When the face is tilted, decide whether the requirement uses vertical depth or distance normal to the face, because the numerical results differ.

Can one reference plane inspect a stepped surface?

Usually not. Each intended terrace needs its own reference, or the inspection needs a registered nominal model that includes the steps. Otherwise, intentional height changes dominate the residual map. Treat uncertain measurements near step edges separately and document any area excluded from inspection.

How should the dent detection threshold be selected?

Use repeated representative scans to estimate noise and reference uncertainty, then validate the threshold against known defects. A multiple of standard deviation is only a starting point. If the resulting threshold exceeds the smallest rejectable depth, improve the measurement process rather than accepting an unvalidated lower setting.

Does a fine height-map grid guarantee accurate defect sizing?

No. Grid spacing determines sample density, while optical response, calibration, surface behavior and processing also affect what can be measured reliably. A finer interpolated grid does not add measured detail. Validate the smallest required defect at representative positions and orientations using the complete acquisition and analysis pipeline.

Is the volume of a thresholded blob the complete dent volume?

Not automatically. Thresholding often excludes the dent's shallow shoulders, so the result describes only the detected region. Full-volume measurement needs a validated boundary and reference definition, appropriate area weighting, and sufficient valid depth coverage. Report whether the value is thresholded-region volume or an estimate of the complete dent.