{
  "original": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "staged": {
    "width": 1184,
    "height": 864,
    "megapixels": 1.02
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3704,
    "deviation": 0.0278,
    "pass": false
  },
  "resolution_kept": false,
  "resolution_ratio": 0.833,
  "raw_drift_score": 41.4,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 508,
    "keypoints_staged": 1003,
    "matches": 135,
    "affine_anisotropy": 0.0022,
    "inliers": 103,
    "inlier_ratio": 0.763,
    "median_residual_px": 0.74,
    "matrix_staged_to_original_work": [
      [
        1.01199,
        -0.00368,
        -5.69108
      ],
      [
        0.00368,
        1.01199,
        9.56753
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: zoom 0.988",
    "zoom": 0.9881,
    "shift_px": [
      -1.2,
      6.8
    ],
    "shift_pct": [
      -0.09,
      0.71
    ],
    "rotation_deg": 0.208,
    "visible_overlap_pct": 98.48,
    "invented_area_pct": 1.12,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 16.7,
      "bottom": 3.1
    },
    "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.8087,
      "line_displaced_frac": 0.1209,
      "line_missing_frac": 0.0704,
      "structural_line_pixels": 21119
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7496,
    "line_recall": 0.7175,
    "line_displaced_frac": 0.1766,
    "line_missing_frac": 0.1059,
    "structural_line_pixels": 5583,
    "evaluated_area_frac": 0.63,
    "drift_score": 26.6,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.969,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 26.6,
  "structure": {
    "edge_ssim": 0.6888,
    "line_recall": 0.4833,
    "line_displaced_frac": 0.3319,
    "line_missing_frac": 0.1847,
    "structural_line_pixels": 6480,
    "evaluated_area_frac": 0.65,
    "drift_score": 41.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/homedesignsai/10.jpg"
  }
}