๐ Lesson 3
D2
Pixel-to-World Mapping: Deriving mm/px and Scaling Factors
Pixel-to-world mapping is how we convert measurements in digital images (like pixels) into real-world physical units (like millimeters) so robots can precisely locate objects.
๐ฏ Learning Objectives
- โ Calculate mm/px scaling factors from calibration target geometry and image resolution
- โ Design a validation procedure using checkerboard targets to verify mapping accuracy within ยฑ0.15 mm tolerance
- โ Analyze the impact of working distance variation on scaling factor uncertainty using thin-lens approximation
- โ Apply homography-based correction to compensate for perspective distortion in top-down blast-hole imaging
๐ Why This Matters
In autonomous drilling and blast-hole verification systems โ like those used by Sandvik AutoMineยฎ or Epiroc SmartROC โ robots must measure hole diameter, depth, and position with โค0.2 mm precision. A single-pixel error at 5 MP resolution translates to >0.3 mm positional drift at 2 m standoff โ enough to misclassify a 100 mm drill hole as out-of-spec. Pixel-to-world mapping bridges vision data and physical action: itโs the silent translator enabling robots to 'see in millimeters', not just pixels.
๐ Core Principles
Pixel-to-world mapping rests on three interdependent layers: (1) Pinhole camera model โ treats imaging as central projection from 3D world to 2D image plane; (2) Calibration โ estimates intrinsic (fx, fy, cx, cy, k1โk3) and extrinsic (R, t) parameters via known 3Dโ2D point correspondences (e.g., checkerboard corners); (3) Scaling derivation โ computes mm/px as the local linear approximation of the projective mapping Jacobian, valid over small regions (<10% FOV). Non-linearity from lens distortion and depth variation means mm/px is *not* globally constant โ it varies with Z-depth and radial position, demanding region-specific or depth-compensated computation.
๐ mm/px Scaling Factor (Local, Near-Orthographic Approximation)
For small regions near image center and fixed working distance Z, mm/px is derived from focal length (in pixels) and sensor physical pitch. This approximation underpins rapid calibration checks and ROI-based measurement in blast-face inspection systems.
Local mm/px Scaling Factor
S_{mm/px} = \frac{p_{mm}}{f_{px}} \cdot ZComputes linear scaling factor (mm per pixel) at image center for a given working distance Z, assuming negligible distortion and orthographic approximation.
Variables:
| Symbol | Name | Unit | Description |
|---|---|---|---|
| S_{mm/px} | Scaling factor | mm/px | Physical size represented by one pixel at specified Z-distance |
| p_{mm} | Pixel pitch | mm | Physical width/height of a single sensor pixel |
| f_{px} | Focal length in pixels | px | Effective focal length expressed in pixel units (f_mm / p_mm) |
| Z | Working distance | mm | Distance from camera optical center to object plane |
Typical Ranges:
Drill rig-mounted HD inspection: 0.3 โ 0.8 mm/px
Close-range borehole ID (50 cm): 0.05 โ 0.15 mm/px
๐ก Worked Example
Problem: A Basler ace acA2440-35um camera (2448 ร 2048 px) uses a 1/1.2โณ CMOS sensor (10.9 mm ร 9.1 mm active area). Mounted 1.8 m from a blast face, its lens has focal length f = 16 mm. Calculate mm/px at image center.
1.
Step 1: Compute pixel pitch = sensor width / image width = 10.9 mm / 2448 px = 0.004452 mm/px (horizontal)
2.
Step 2: Apply magnification M โ f / Z = 16 mm / 1800 mm = 0.008889
3.
Step 3: Scale pixel pitch to world: mm/px = pixel_pitch / M = 0.004452 mm/px / 0.008889 โ 0.5007 mm/px
Answer:
The result is 0.501 mm/px (ยฑ0.003 mm/px), which falls within the safe range of 0.45โ0.55 mm/px for Z = 1.8 ยฑ 0.1 m.
๐๏ธ Real-World Application
At BHPโs South Flank iron ore operation, an automated blast-hole verifier uses two synchronized Basler cameras mounted on a robotic arm. Before each shift, the system performs a 12-point checkerboard calibration at 1.75 m, 1.85 m, and 1.95 m standoff distances. For each Z, it computes a 3ร3 homography matrix and stores mm/px lookup tables per 100ร100 px tile. During operation, real-time Z-depth (from laser triangulation) selects the appropriate tile map โ achieving 0.12 mm RMS positional accuracy across 2.5 mยฒ blast face, meeting ISO 10360-8:2022 requirements for automated optical measurement systems.