{
  "original": {
    "width": 1920,
    "height": 1484,
    "megapixels": 2.85
  },
  "staged": {
    "width": 1152,
    "height": 896,
    "megapixels": 1.03
  },
  "aspect_ratio": {
    "original": 1.2938,
    "staged": 1.2857,
    "deviation": 0.0062,
    "pass": true
  },
  "resolution_kept": false,
  "resolution_ratio": 0.362,
  "raw_drift_score": 10.7,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 550,
    "keypoints_staged": 947,
    "matches": 220,
    "affine_anisotropy": 0.0004,
    "inliers": 162,
    "inlier_ratio": 0.736,
    "median_residual_px": 0.5,
    "matrix_staged_to_original_work": [
      [
        0.99417,
        -0.00044,
        2.4152
      ],
      [
        0.00044,
        0.99417,
        0.08242
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 1.0059,
    "shift_px": [
      -1.4,
      0.9
    ],
    "shift_pct": [
      -0.07,
      0.06
    ],
    "rotation_deg": 0.025,
    "visible_overlap_pct": 99.45,
    "invented_area_pct": 0.0,
    "original_px_lost": {
      "left": 4.5,
      "right": 7.3,
      "top": 1.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.9922,
      "line_displaced_frac": 0.0078,
      "line_missing_frac": 0.0,
      "structural_line_pixels": 85713
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.8875,
    "line_recall": 0.9681,
    "line_displaced_frac": 0.0139,
    "line_missing_frac": 0.018,
    "structural_line_pixels": 21347,
    "evaluated_area_frac": 0.64,
    "drift_score": 7.2,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.986,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 7.2,
  "structure": {
    "edge_ssim": 0.8509,
    "line_recall": 0.9357,
    "line_displaced_frac": 0.0462,
    "line_missing_frac": 0.0181,
    "structural_line_pixels": 21349,
    "evaluated_area_frac": 0.65,
    "drift_score": 10.7,
    "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/homedesignsai/05.jpg"
  }
}