{
  "original": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "staged": {
    "width": 2048,
    "height": 1536,
    "megapixels": 3.15
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3333,
    "deviation": 0.0,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 2.56,
  "raw_drift_score": 25.4,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 508,
    "keypoints_staged": 752,
    "matches": 109,
    "affine_anisotropy": 0.0002,
    "inliers": 87,
    "inlier_ratio": 0.798,
    "median_residual_px": 0.77,
    "matrix_staged_to_original_work": [
      [
        1.0009,
        -0.00172,
        0.81974
      ],
      [
        0.00172,
        1.0009,
        0.04138
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9991,
    "shift_px": [
      0.8,
      1.6
    ],
    "shift_pct": [
      0.06,
      0.16
    ],
    "rotation_deg": 0.098,
    "visible_overlap_pct": 99.85,
    "invented_area_pct": 0.09,
    "original_px_lost": {
      "left": 1.0,
      "right": 0.0,
      "top": 2.3,
      "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.8779,
      "line_displaced_frac": 0.0962,
      "line_missing_frac": 0.0258,
      "structural_line_pixels": 21706
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.802,
    "line_recall": 0.7081,
    "line_displaced_frac": 0.1375,
    "line_missing_frac": 0.1543,
    "structural_line_pixels": 6479,
    "evaluated_area_frac": 0.643,
    "drift_score": 24.5,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.99,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 24.5,
  "structure": {
    "edge_ssim": 0.7968,
    "line_recall": 0.6957,
    "line_displaced_frac": 0.1406,
    "line_missing_frac": 0.1637,
    "structural_line_pixels": 6480,
    "evaluated_area_frac": 0.65,
    "drift_score": 25.4,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 240,
  "seconds_approx": true,
  "files": {
    "original": "photos/10-open-plan-with-clutter.jpg",
    "staged": "results/virtualstagingflow/10.jpg"
  }
}