{
  "original": {
    "width": 1920,
    "height": 1295,
    "megapixels": 2.49
  },
  "staged": {
    "width": 1536,
    "height": 1024,
    "megapixels": 1.57
  },
  "aspect_ratio": {
    "original": 1.4826,
    "staged": 1.5,
    "deviation": 0.0117,
    "pass": false
  },
  "resolution_kept": false,
  "resolution_ratio": 0.633,
  "raw_drift_score": 18.3,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 1016,
    "keypoints_staged": 1004,
    "matches": 276,
    "affine_anisotropy": 0.0058,
    "inliers": 258,
    "inlier_ratio": 0.935,
    "median_residual_px": 0.5,
    "matrix_staged_to_original_work": [
      [
        1.00191,
        0.00045,
        -0.73831
      ],
      [
        -0.00045,
        1.00191,
        2.83846
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9981,
    "shift_px": [
      0.7,
      -1.4
    ],
    "shift_pct": [
      0.04,
      -0.11
    ],
    "rotation_deg": -0.026,
    "visible_overlap_pct": 99.2,
    "invented_area_pct": 0.1,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 5.3,
      "bottom": 8.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.9919,
      "line_displaced_frac": 0.0069,
      "line_missing_frac": 0.0012,
      "structural_line_pixels": 77581
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7481,
    "line_recall": 0.8729,
    "line_displaced_frac": 0.0935,
    "line_missing_frac": 0.0336,
    "structural_line_pixels": 35016,
    "evaluated_area_frac": 0.64,
    "drift_score": 18.9,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.985,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 18.9,
  "structure": {
    "edge_ssim": 0.7604,
    "line_recall": 0.8732,
    "line_displaced_frac": 0.111,
    "line_missing_frac": 0.0158,
    "structural_line_pixels": 35029,
    "evaluated_area_frac": 0.65,
    "drift_score": 18.3,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/07-living-large-window.jpg",
    "staged": "results/ai-homedesign/07.jpg"
  }
}