{
  "original": {
    "width": 1920,
    "height": 1528,
    "megapixels": 2.93
  },
  "staged": {
    "width": 1360,
    "height": 1024,
    "megapixels": 1.39
  },
  "aspect_ratio": {
    "original": 1.2565,
    "staged": 1.3281,
    "deviation": 0.057,
    "pass": false
  },
  "resolution_kept": false,
  "resolution_ratio": 0.475,
  "raw_drift_score": 17.2,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 659,
    "keypoints_staged": 848,
    "matches": 175,
    "affine_anisotropy": 0.0505,
    "inliers": 64,
    "inlier_ratio": 0.366,
    "median_residual_px": 1.25,
    "matrix_staged_to_original_work": [
      [
        1.01187,
        -0.01682,
        -0.37265
      ],
      [
        0.01682,
        1.01187,
        4.9715
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: only 95.8% of the original frame visible; zoom 0.988; rotated 0.95 deg",
    "zoom": 0.9881,
    "shift_px": [
      -1.5,
      -7.2
    ],
    "shift_pct": [
      -0.08,
      -0.47
    ],
    "rotation_deg": 0.952,
    "visible_overlap_pct": 95.83,
    "invented_area_pct": 1.1,
    "original_px_lost": {
      "left": 0.0,
      "right": 2.2,
      "top": 41.6,
      "bottom": 56.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.9205,
      "line_displaced_frac": 0.073,
      "line_missing_frac": 0.0065,
      "structural_line_pixels": 56897
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7238,
    "line_recall": 0.7564,
    "line_displaced_frac": 0.1788,
    "line_missing_frac": 0.0648,
    "structural_line_pixels": 14839,
    "evaluated_area_frac": 0.628,
    "drift_score": 26.0,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.967,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 26.0,
  "structure": {
    "edge_ssim": 0.7864,
    "line_recall": 0.8705,
    "line_displaced_frac": 0.0746,
    "line_missing_frac": 0.0549,
    "structural_line_pixels": 14804,
    "evaluated_area_frac": 0.649,
    "drift_score": 17.2,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/06-bedroom-single-window.jpg",
    "staged": "results/ai-homedesign/06.jpg"
  }
}