Chapter 3 Device and Mode Binding (Sensors / Modalities)


One-Sentence Goal
Decode heterogeneous imaging devices and modalities into the unified standard schema SRef.img, ensuring metrological, time-base, and path consistency so that downstream processing and audits are fully traceable.


I. Scope & Objects

  1. Covered devices & modalities
    • Area/line CMOS/CCD; CFA/monochrome/three-chip; multispectral/hyperspectral; ToF (phase/pulse/gated); polarization cameras; HDR multi-exposure; rolling/global shutter; analog/digital gain chains.
    • Inputs: raw_blob, sensor_meta, optics_meta, timing, env, calib_assets.
    • Outputs:
      SRef.img = { DN, I_lin, masks, mode_axes, tau_map, manifest.imaging.device }.
  2. Boundaries
    • Strongly time-varying PSF, non-standard in-house packs, or proprietary compression must supply a decoder and a statement of deviations.
    • Irreversibly processed streams from external ISPs are ingested as “already processed”; applicable steps in this chapter are skipped and the omission is recorded.

II. Terms & Variables

  1. Metrology & encoding: DN, bpp, SatMax, black_level, gain, offset, packing ∈ {RAW10, RAW12, RAW14, ...}, endianness ∈ {LE, BE}.
  2. Spatial & pixel layout: H, W, C, pitch, orientation ∈ {0,90,180,270}, flip_x, flip_y.
  3. CFA & color: cfa_pattern ∈ {RGGB, BGGR, GRBG, GBRG}, S_cfa.
  4. Timing & sync: exposure_time, line_time, frame_time, ts, tau_mono, offset/skew/J, rolling/global.
  5. Modality specifics
    • ToF: I_cos, I_sin, phi, f_mod, n_eff, T_arr, d_range.
    • Polarization: I0,I45,I90,I135, S0,S1,S2,S3, DoLP, AoLP.
    • Multi/hyperspectral: λ_k, Δλ, I(λ_k).
  6. Masks & quality: mask_bad, mask_hot, mask_sat, q_score.
  7. Traceability: TraceID, hash_sha256(blob), signature.

*III. Axioms P203- **


*IV. Minimal Equations S203- **


*V. Mode-Binding Process M30- **

  1. M30-1 Device registration: Resolve sensor_id / optics_id / firmware from a registry; complete/validate sensor_meta and units.
  2. M30-2 Bitstream decode: Run S203-1 to produce DN and a bpp report.
  3. M30-3 Orientation & coordinate canonicalization: Run S203-2 to normalize coordinates; validate a chessboard or equivalent test pattern orientation.
  4. M30-4 CFA / modality detection: Read cfa_pattern / mode; for non-CFA modalities, register mode_axes.
  5. M30-5 Linearization & saturation mask: Run S203-3; record the provenance and uncertainty of gain / black_level / SatMax.
  6. M30-6 Mask construction: Merge bad_pixel_map / hot_pixel_map with mask_sat to obtain mask_bad / mask_hot / mask_sat.
  7. M30-7 Time-base mapping: For rolling shutter, compute ts_row and map to ts; persist offset/skew/J.
  8. M30-8 Modality-specific derivations:
    • ToF: run S203-5 / S203-6 to obtain phi / T_arr / d_range / delta_form.
    • Polarization: run S203-7 to obtain S0,S1,S2,DoLP,AoLP.
    • Spectral: register λ_k / Δλ / I(λ_k) and optionally run S203-8.
  9. M30-9 Validation & signing: Execute the contract library; generate assert_report; write manifest.imaging.device and sign.
  10. M30-10 Binding complete: Emit SRef.img for downstream metrology / demosaic / color / HDR pipelines.

VI. Contracts & Assertions


*VII. Implementation Bindings I30- **


VIII. Cross-References


IX. Quality Metrics & Risk Control


Summary
This chapter standardizes device- and modality-level binding: from bitstream decode, orientation canonicalization, linearization and masking, to time-base mapping and modality-specific derivations—paired with contracts and implementation prototypes—so SRef.img can be reliably consumed by downstream optics, color, HDR, and geometry pipelines.