{
  "original": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "staged": {
    "width": 2528,
    "height": 1696,
    "megapixels": 4.29
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.4906,
    "deviation": 0.1179,
    "pass": false
  },
  "resolution_kept": true,
  "resolution_ratio": 3.489,
  "raw_drift_score": 36.7,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 508,
    "keypoints_staged": 1161,
    "matches": 168,
    "affine_anisotropy": 0.0005,
    "inliers": 148,
    "inlier_ratio": 0.881,
    "median_residual_px": 0.45,
    "matrix_staged_to_original_work": [
      [
        0.99378,
        -0.00011,
        3.24371
      ],
      [
        0.00011,
        0.99378,
        42.99635
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: only 88.6% of the original frame visible",
    "zoom": 1.0063,
    "shift_px": [
      0.0,
      0.5
    ],
    "shift_pct": [
      0.0,
      0.05
    ],
    "rotation_deg": 0.007,
    "visible_overlap_pct": 88.63,
    "invented_area_pct": 0.0,
    "original_px_lost": {
      "left": 4.1,
      "right": 4.0,
      "top": 53.9,
      "bottom": 52.8
    },
    "criteria": "overlap >= 97%, zoom 0.99-1.02, |rotation| <= 0.5 deg, invented area <= 2%",
    "units": "px of the original image; shift = staged frame centre vs original centre; zoom > 1 = cropped/zoomed in"
  },
  "diagnostics": {
    "sensitive_edges": {
      "line_recall": 0.9864,
      "line_displaced_frac": 0.0136,
      "line_missing_frac": 0.0,
      "structural_line_pixels": 20746
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.781,
    "line_recall": 0.7949,
    "line_displaced_frac": 0.1457,
    "line_missing_frac": 0.0594,
    "structural_line_pixels": 5299,
    "evaluated_area_frac": 0.58,
    "drift_score": 21.2,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.893,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 21.2,
  "structure": {
    "edge_ssim": 0.6946,
    "line_recall": 0.5718,
    "line_displaced_frac": 0.3184,
    "line_missing_frac": 0.1099,
    "structural_line_pixels": 6480,
    "evaluated_area_frac": 0.65,
    "drift_score": 36.7,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 55,
  "seconds_approx": true,
  "files": {
    "original": "photos/10-open-plan-with-clutter.jpg",
    "staged": "results/tinty/10.jpg"
  }
}