{
  "original": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "staged": {
    "width": 1360,
    "height": 1024,
    "megapixels": 1.39
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3281,
    "deviation": 0.0039,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 1.133,
  "raw_drift_score": 18.4,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 508,
    "keypoints_staged": 851,
    "matches": 214,
    "affine_anisotropy": 0.0042,
    "inliers": 189,
    "inlier_ratio": 0.883,
    "median_residual_px": 0.44,
    "matrix_staged_to_original_work": [
      [
        0.99922,
        -0.00014,
        0.21648
      ],
      [
        0.00014,
        0.99922,
        -0.82898
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 1.0008,
    "shift_px": [
      -0.3,
      0.5
    ],
    "shift_pct": [
      -0.02,
      0.06
    ],
    "rotation_deg": 0.008,
    "visible_overlap_pct": 100.0,
    "invented_area_pct": 0.26,
    "original_px_lost": {
      "left": 0.3,
      "right": 0.9,
      "top": 0.0,
      "bottom": 0.0
    },
    "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.9666,
      "line_displaced_frac": 0.028,
      "line_missing_frac": 0.0054,
      "structural_line_pixels": 21291
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.8665,
    "line_recall": 0.7127,
    "line_displaced_frac": 0.1556,
    "line_missing_frac": 0.1317,
    "structural_line_pixels": 5777,
    "evaluated_area_frac": 0.647,
    "drift_score": 21.0,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.995,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 21.0,
  "structure": {
    "edge_ssim": 0.8593,
    "line_recall": 0.7735,
    "line_displaced_frac": 0.1472,
    "line_missing_frac": 0.0793,
    "structural_line_pixels": 6480,
    "evaluated_area_frac": 0.65,
    "drift_score": 18.4,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/10-open-plan-with-clutter.jpg",
    "staged": "results/ai-homedesign/10.jpg"
  }
}