{
  "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": 29.0,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 577,
    "keypoints_staged": 692,
    "matches": 86,
    "affine_anisotropy": 0.0001,
    "inliers": 54,
    "inlier_ratio": 0.628,
    "median_residual_px": 0.25,
    "matrix_staged_to_original_work": [
      [
        0.99923,
        -0.00023,
        0.20899
      ],
      [
        0.00023,
        0.99923,
        10.60568
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 1.0008,
    "shift_px": [
      -0.3,
      -0.1
    ],
    "shift_pct": [
      -0.03,
      -0.01
    ],
    "rotation_deg": 0.013,
    "visible_overlap_pct": 97.27,
    "invented_area_pct": 0.0,
    "original_px_lost": {
      "left": 0.3,
      "right": 0.9,
      "top": 13.6,
      "bottom": 13.7
    },
    "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.7937,
      "line_displaced_frac": 0.1209,
      "line_missing_frac": 0.0854,
      "structural_line_pixels": 22115
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7702,
    "line_recall": 0.6879,
    "line_displaced_frac": 0.2586,
    "line_missing_frac": 0.0535,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.627,
    "drift_score": 27.1,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.965,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 27.1,
  "structure": {
    "edge_ssim": 0.7606,
    "line_recall": 0.659,
    "line_displaced_frac": 0.2701,
    "line_missing_frac": 0.0708,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.65,
    "drift_score": 29.0,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/02-room-with-doorway.jpg",
    "staged": "results/homedesignsai/02.jpg"
  }
}