{
  "original": {
    "width": 1920,
    "height": 1484,
    "megapixels": 2.85
  },
  "staged": {
    "width": 1360,
    "height": 1024,
    "megapixels": 1.39
  },
  "aspect_ratio": {
    "original": 1.2938,
    "staged": 1.3281,
    "deviation": 0.0265,
    "pass": false
  },
  "resolution_kept": false,
  "resolution_ratio": 0.489,
  "raw_drift_score": 12.9,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 550,
    "keypoints_staged": 899,
    "matches": 199,
    "affine_anisotropy": 0.0219,
    "inliers": 133,
    "inlier_ratio": 0.668,
    "median_residual_px": 0.88,
    "matrix_staged_to_original_work": [
      [
        1.00214,
        -0.00375,
        -0.83499
      ],
      [
        0.00375,
        1.00214,
        2.6057
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9979,
    "shift_px": [
      -2.2,
      -8.7
    ],
    "shift_pct": [
      -0.12,
      -0.59
    ],
    "rotation_deg": 0.214,
    "visible_overlap_pct": 97.77,
    "invented_area_pct": 0.24,
    "original_px_lost": {
      "left": 0.0,
      "right": 2.9,
      "top": 12.1,
      "bottom": 29.5
    },
    "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.952,
      "line_displaced_frac": 0.0451,
      "line_missing_frac": 0.0029,
      "structural_line_pixels": 82925
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7851,
    "line_recall": 0.819,
    "line_displaced_frac": 0.0964,
    "line_missing_frac": 0.0847,
    "structural_line_pixels": 20294,
    "evaluated_area_frac": 0.639,
    "drift_score": 19.8,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.983,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 19.8,
  "structure": {
    "edge_ssim": 0.8365,
    "line_recall": 0.9055,
    "line_displaced_frac": 0.0751,
    "line_missing_frac": 0.0193,
    "structural_line_pixels": 21349,
    "evaluated_area_frac": 0.65,
    "drift_score": 12.9,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/05-bay-window-fireplace.jpg",
    "staged": "results/ai-homedesign/05.jpg"
  }
}