DEV Community

mhd barghoth
mhd barghoth

Posted on

How Sensor Data Becomes a 3D Ground Scan: A Practical Look at the Processing Pipeline

How Sensor Data Becomes a 3D Ground Scan: A Practical Look at the Processing Pipeline

When people see a colorful 3D ground-scan visualization, it is easy to assume that the device is somehow producing a direct image of what exists underground.

That is not really what happens.

A ground-scanning system collects measurements. Software then organizes those measurements, applies processing rules, and converts the resulting dataset into a visualization that is easier for the operator to interpret.

From a software perspective, this makes ground scanning an interesting example of a broader engineering problem:

How do you turn noisy physical sensor readings into structured, useful visual information?

This article looks at that process from a technical point of view.

1. The Pipeline Starts With Measurements

Every visualization begins with raw input.

Depending on the detection technology, a sensor may measure changes in electromagnetic response, conductivity, magnetic behavior, or another physical property associated with the ground.

A simplified measurement might look like this:

position_x = 2.0
position_y = 4.0
sensor_value = 73.4
Enter fullscreen mode Exit fullscreen mode

One measurement by itself provides very little information.

The useful dataset is created when the operator scans many points across a defined area.

For example:

X,Y,Value
0,0,51.2
1,0,52.8
2,0,69.1
3,0,71.4
0,1,50.7
1,1,53.0
2,1,68.8
3,1,72.1
Enter fullscreen mode Exit fullscreen mode

Now the application can begin looking for patterns.

The important idea is that the visualization is derived from a matrix of sensor readings, not from a camera-like image.

2. Spatial Consistency Matters

Software can only create a useful representation if it knows where each measurement belongs.

That means the scan pattern needs to be consistent.

A basic field scan can be modeled as a grid:

Start
 ↓
A1 → A2 → A3 → A4
                  ↓
B1 ← B2 ← B3 ← B4
 ↓
C1 → C2 → C3 → C4
Enter fullscreen mode Exit fullscreen mode

This serpentine scanning pattern is common because it allows the operator to cover the area efficiently without returning to the same side after every line.

From the application's perspective, each sample must eventually be mapped to the correct coordinates.

One possible structure is:

const scanPoint = {
  row: 4,
  column: 7,
  value: 62.5
};
Enter fullscreen mode Exit fullscreen mode

A collection of these records can then be converted into a two-dimensional matrix.

const scan = [
  [50, 51, 52, 53],
  [49, 55, 67, 54],
  [48, 56, 71, 53],
  [49, 52, 54, 51]
];
Enter fullscreen mode Exit fullscreen mode

A noticeable deviation appears near the center.

That deviation may deserve investigation, but software should not immediately label it as a specific underground object.

It is simply an anomaly in the measured data.

3. Raw Sensor Values Usually Need Normalization

Raw field data can vary substantially.

Imagine one scan where readings range from:

40 to 80
Enter fullscreen mode Exit fullscreen mode

and another where they range from:

700 to 1,100
Enter fullscreen mode Exit fullscreen mode

If the visualization engine uses absolute values directly, the two datasets may be difficult to compare.

Normalization solves part of this problem.

A simple min-max normalization is:

normalized = (value - min) / (max - min)
Enter fullscreen mode Exit fullscreen mode

In JavaScript:

function normalize(value, min, max) {
  if (max === min) return 0;
  return (value - min) / (max - min);
}
Enter fullscreen mode Exit fullscreen mode

The resulting values fall between:

0.0 and 1.0
Enter fullscreen mode Exit fullscreen mode

This gives the visualization layer a predictable range to work with.

However, normalization must be used carefully.

If a dataset contains one extreme outlier, that point can distort the entire scale.

For that reason, real analysis software may use percentile clipping, median statistics, adaptive ranges, or other techniques.

4. Noise Is a Major Problem

Real-world sensors rarely produce perfectly stable measurements.

The recorded value may contain:

actual environmental signal
+
sensor noise
+
operator variation
+
electromagnetic interference
+
measurement error
Enter fullscreen mode Exit fullscreen mode

This can produce a noisy sequence:

51
50
53
49
71
54
52
Enter fullscreen mode Exit fullscreen mode

Was the 71 a real anomaly?

Or just noise?

Software can attempt to reduce noise using filtering techniques.

One of the simplest is a moving average.

function movingAverage(values, windowSize = 3) {
  return values.map((_, index) => {
    const start = Math.max(0, index - windowSize + 1);
    const window = values.slice(start, index + 1);

    return (
      window.reduce((sum, value) => sum + value, 0) /
      window.length
    );
  });
}
Enter fullscreen mode Exit fullscreen mode

This can smooth abrupt fluctuations.

But filtering introduces a tradeoff.

Too little filtering:

noisy visualization
Enter fullscreen mode Exit fullscreen mode

Too much filtering:

small real anomalies disappear
Enter fullscreen mode Exit fullscreen mode

The correct approach depends on the sensor, expected target size, sampling density, and field environment.

5. Baseline Correction Can Reveal Anomalies

Another useful technique is comparing measurements with a baseline.

Suppose most readings in an area are near:

52
Enter fullscreen mode Exit fullscreen mode

but several adjacent measurements are:

68
70
72
69
Enter fullscreen mode Exit fullscreen mode

Instead of displaying absolute values, the application can display deviation:

deviation = measured_value - baseline
Enter fullscreen mode Exit fullscreen mode

Example:

const baseline = 52;

const deviation = measurements.map(
  value => value - baseline
);
Enter fullscreen mode Exit fullscreen mode

The resulting dataset might be:

-1
0
1
16
18
20
17
Enter fullscreen mode Exit fullscreen mode

Now the anomaly becomes much easier to visualize.

Choosing the baseline correctly is important.

Possible methods include:

  • global average
  • median
  • first scan line
  • reference area
  • rolling local baseline

Each method changes the interpretation slightly.

6. Turning a Grid Into a Heatmap

Once the measurements are normalized, the software can assign visual values.

For example:

0.00 → low response
0.25 → below average
0.50 → baseline
0.75 → elevated response
1.00 → strongest response
Enter fullscreen mode Exit fullscreen mode

A simple rendering function might look like:

function getIntensity(value) {
  return Math.round(value * 255);
}
Enter fullscreen mode Exit fullscreen mode

Then the matrix becomes a heatmap.

A simplified example:

0.21  0.23  0.25  0.24
0.22  0.31  0.70  0.28
0.20  0.35  0.91  0.30
0.21  0.27  0.33  0.26
Enter fullscreen mode Exit fullscreen mode

The operator immediately sees a concentrated region of stronger readings.

This is one reason visualization is valuable.

Humans are often better at recognizing spatial patterns visually than by reading hundreds of numerical values.

7. Interpolation Creates Smoother Images

Field measurements are discrete.

You might only collect one measurement every 20 cm or 50 cm.

But the final visualization often appears continuous.

That happens through interpolation.

Imagine four measured points:

A -------- B
|          |
|          |
C -------- D
Enter fullscreen mode Exit fullscreen mode

The software estimates values between them.

Common interpolation techniques include:

  • nearest-neighbor interpolation
  • bilinear interpolation
  • bicubic interpolation
  • inverse-distance weighting
  • kriging in more advanced geospatial applications

A simplified linear interpolation function is:

function lerp(a, b, t) {
  return a + (b - a) * t;
}
Enter fullscreen mode Exit fullscreen mode

If:

a = 50
b = 70
t = 0.5
Enter fullscreen mode Exit fullscreen mode

then:

60
Enter fullscreen mode Exit fullscreen mode

Interpolation makes the visualization easier to read.

But there is an important limitation:

interpolated values were not actually measured.

They are estimates generated between measured points.

That distinction matters when interpreting a scan.

8. From Heatmap to 3D Surface

Once the application has a two-dimensional matrix, creating a 3D representation becomes straightforward.

Each point can be mapped to:

x = horizontal position
z = vertical position
y = normalized sensor value
Enter fullscreen mode Exit fullscreen mode

For example:

const point = {
  x: column,
  y: normalizedValue * heightScale,
  z: row
};
Enter fullscreen mode Exit fullscreen mode

A visualization engine such as Three.js could use these points to generate a surface mesh.

Conceptually:

for (let row = 0; row < data.length; row++) {
  for (let col = 0; col < data[row].length; col++) {

    const value = data[row][col];

    vertices.push({
      x: col,
      y: value * 10,
      z: row
    });
  }
}
Enter fullscreen mode Exit fullscreen mode

The result is a surface where stronger measurements appear higher or lower depending on the visualization convention.

Color can provide another layer of interpretation.

For example:

blue   = lower relative value
green  = baseline
yellow = elevated
red    = strong deviation
Enter fullscreen mode Exit fullscreen mode

Again, these colors do not automatically correspond to specific objects.

They represent ranges of measured values.

9. Visualization Should Not Pretend to Know More Than the Data

This is one of the most important design principles.

Suppose the software detects an anomaly.

It may be tempting to display:

GOLD TARGET FOUND
Enter fullscreen mode Exit fullscreen mode

But the sensor may not provide enough information to justify that conclusion.

A better interface might say:

Strong anomaly detected
Confidence: 78%
Recommended action: rescan from perpendicular direction
Enter fullscreen mode Exit fullscreen mode

Good technical software should distinguish between:

measurement

and

interpretation

For example:

Measured:

signal intensity increased 37%
Enter fullscreen mode Exit fullscreen mode

Interpretation:

possible underground anomaly
Enter fullscreen mode Exit fullscreen mode

Claiming more certainty than the underlying sensor supports is bad engineering.

10. Multiple Scan Directions Can Improve Confidence

Suppose an anomaly appears during a north-to-south scan.

A useful validation technique is scanning the same area east-to-west.

If the pattern appears in approximately the same location, confidence increases.

The application could compare two matrices:

const scanA = getNorthSouthScan();
const scanB = getEastWestScan();
Enter fullscreen mode Exit fullscreen mode

Then calculate similarity around suspicious regions.

This is conceptually similar to verifying a result using another observation.

A repeatable anomaly is generally more meaningful than a single isolated response.

11. Metadata Is Also Valuable

The measurement itself is only part of the dataset.

A professional scanning application may record:

{
  "scan_id": "SCAN-2047",
  "date": "2026-09-28",
  "rows": 20,
  "columns": 30,
  "spacing_cm": 25,
  "soil_type": "mineralized",
  "sensor_mode": "ground_scan",
  "operator": "field-team-1"
}
Enter fullscreen mode Exit fullscreen mode

Additional useful metadata might include:

  • GPS coordinates
  • scan direction
  • sensor sensitivity
  • ground-balance setting
  • equipment model
  • firmware version
  • weather conditions
  • notes from the operator

This is valuable because two datasets may look similar while having been collected under completely different conditions.

Without metadata, later analysis becomes much harder.

12. Mobile Applications Make Field Analysis More Practical

Modern mobile devices are powerful enough to handle many visualization tasks directly in the field.

A tablet can:

  1. receive measurements
  2. store scan sessions
  3. normalize the data
  4. generate heatmaps
  5. render 3D surfaces
  6. allow rotation and zoom
  7. compare previous scans
  8. export reports

This is increasingly important in professional detection systems, where the physical sensor and the visualization software may be separate components.

A field operator can collect measurements with dedicated hardware and analyze them on a larger mobile display.

For a broader look at how professional equipment combines sensors, search systems, and digital analysis, this guide to ground detection technology provides additional examples of the technologies used in modern field systems.

13. A Simple Architecture

A ground-scan application could be structured like this:

Sensor Hardware
      ↓
Data Acquisition Layer
      ↓
Validation
      ↓
Noise Filtering
      ↓
Normalization
      ↓
Spatial Mapping
      ↓
Interpolation
      ↓
Visualization
      ↓
User Interpretation
Enter fullscreen mode Exit fullscreen mode

In software components:

SensorAdapter
ScanSession
MeasurementStore
SignalProcessor
GridBuilder
Interpolator
VisualizationRenderer
ReportExporter
Enter fullscreen mode Exit fullscreen mode

Each component has a clear responsibility.

For example:

class SignalProcessor {
  normalize(data) {
    // normalize measurements
  }

  filterNoise(data) {
    // smooth unwanted variations
  }

  calculateBaseline(data) {
    // determine reference value
  }
}
Enter fullscreen mode Exit fullscreen mode

Keeping acquisition separate from visualization is particularly important.

It allows the processing algorithms to change without modifying the sensor interface.

14. What Developers Should Keep in Mind

If you are building software around physical sensor data, several lessons from ground scanning apply to many other applications.

Preserve the raw measurements

Never overwrite raw data after filtering.

Store:

raw data
processed data
processing parameters
Enter fullscreen mode Exit fullscreen mode

This allows analysis to be reproduced later.

Record configuration

If sensitivity or calibration changes, record it.

Without configuration metadata, comparing sessions can become meaningless.

Show uncertainty

Do not display algorithmic interpretation as absolute truth.

Use confidence indicators where appropriate.

Make visualizations reproducible

If a user opens the same dataset tomorrow, the same processing settings should produce the same visualization.

Avoid excessive smoothing

A beautiful visualization can be less accurate than an ugly one.

The goal is not to create the smoothest possible image.

The goal is to represent the measurements faithfully.

Conclusion

A 3D ground scan is fundamentally a data-processing problem.

The pipeline begins with individual sensor measurements and gradually transforms them through spatial organization, normalization, filtering, interpolation, and visualization.

The final colorful image is therefore not the raw measurement itself.

It is a visual interpretation of a structured dataset.

For developers, this makes field detection an interesting example of how software can turn imperfect real-world signals into useful information.

The same principles apply far beyond ground scanning—to environmental sensors, industrial monitoring, geophysics, robotics, medical equipment, IoT systems, and almost any application where software needs to make physical measurements understandable.

The challenge is always the same:

collect reliable data, preserve its meaning, process it carefully, and never let the visualization claim more than the sensor actually knows.

Top comments (0)