🎓 Lesson 6 D4

Blob Analysis Pipeline: Thresholding, Morphology, and Centroid Fitting

Blob analysis is a way for computers to find and measure round or blob-like objects in a digital image—like spotting drill holes or blast holes in a mine face photo.

🎯 Learning Objectives

  • Explain the role of adaptive thresholding in mitigating uneven illumination on blasted rock faces
  • Design a morphology sequence (erosion/dilation) to remove noise while preserving true blast hole centroids
  • Calculate sub-pixel centroid coordinates using image moments and evaluate their accuracy against ground-truth survey data
  • Analyze circularity and solidity metrics to distinguish valid blast holes from false positives (e.g., cracks or shadows)
  • Apply Otsu’s method to automatically determine optimal global threshold for grayscale drill-face images

📖 Why This Matters

In autonomous drilling and blast-hole mapping systems—used by companies like Sandvik, Epiroc, and Komatsu—robots must locate blast holes with ≤2 mm positional accuracy before loading explosives. A single mislocalized hole can cause flyrock, poor fragmentation, or equipment damage. Blob analysis is the first reliable, real-time vision step that transforms raw camera feeds into actionable spatial coordinates—making it the cornerstone of safe, precise, and compliant robotic blasting operations.

📘 Core Principles

Blob analysis begins with grayscale-to-binary conversion via thresholding: pixels above threshold become foreground (1), others background (0). Morphological operations (erosion, dilation, opening, closing) then clean noise and unify fragmented regions. Connected-component labeling identifies distinct blobs; each is assigned a unique ID. For each blob, image moments (zeroth, first, second order) compute centroid (center of mass), area, orientation, and shape descriptors. Sub-pixel centroid refinement uses intensity-weighted moments or Gaussian fitting to achieve precision beyond pixel grid limits—critical when working at 0.1–0.5 mm/pixel resolution common in mine-face inspection cameras.

📐 Centroid via Image Moments

The centroid (x̄, ȳ) of a binary blob is computed from zeroth- and first-order image moments. For sub-pixel accuracy, intensity-weighted (grayscale) moments are used over the segmented region.

Centroid (Intensity-Weighted)

x̄ = M₁₀ / M₀₀, ȳ = M₀₁ / M₀₀, where Mₚq = ΣΣ xᵖ yᵠ I(x,y)

Computes the center-of-mass position of a region using grayscale intensity as weight, enabling sub-pixel localization accuracy.

Variables:
SymbolNameUnitDescription
x̄, ȳ Centroid coordinates pixels (or mm after scaling) Sub-pixel location of the blob's intensity-weighted center
M₀₀ Zeroth-order moment intensity·pixel² Total summed intensity in the region — equivalent to weighted area
M₁₀, M₀₁ First-order moments intensity·pixel³ Weighted sums of column and row indices across the region
Typical Ranges:
Blast hole detection (0.2 mm/px): 0.05–0.8 mm RMS error
Drill bit tip localization (0.05 mm/px): 0.01–0.05 mm RMS error

💡 Worked Example

Problem: Given a 5×5 ROI centered on a partially filled blast hole, with normalized intensity values (0.0–1.0) and pixel spacing = 0.25 mm/pixel. Compute sub-pixel centroid.
1. Step 1: Sum all intensities → M₀₀ = ΣI(x,y) = 14.3
2. Step 2: Compute weighted sums → M₁₀ = Σx·I(x,y) = 36.8, M₀₁ = Σy·I(x,y) = 35.2
3. Step 3: Calculate centroid → x̄ = M₁₀/M₀₀ = 36.8/14.3 ≈ 2.573 px, ȳ = M₀₁/M₀₀ = 35.2/14.3 ≈ 2.462 px
4. Step 4: Convert to mm → x̄_mm = 2.573 × 0.25 = 0.643 mm, ȳ_mm = 2.462 × 0.25 = 0.616 mm (relative to ROI origin)
Answer: The sub-pixel centroid is (0.643 mm, 0.616 mm), which falls within the ±0.8 mm typical tolerance required for robotic drill-bit alignment per ISO 19433-2.

🏗️ Real-World Application

At Newmont’s Boddington Mine (Western Australia), a vision-guided robotic drill rig uses blob analysis on 12 MP thermal+visible stereo images of freshly drilled faces. After adaptive histogram equalization and Sauvola thresholding (to handle wet/dusty conditions), morphological opening (disk structuring element, radius = 3 px) removes dust speckles. Connected components with area 120–650 px² and circularity > 0.75 are retained as valid holes. Centroids are refined using Zernike moment-based sub-pixel fitting, achieving 0.42 mm RMS error vs. total station survey—enabling automated explosive charge placement within 99.7% compliance with Australian Standard AS 2187.2.

📚 References