{
  "original": {
    "width": 1600,
    "height": 1200,
    "megapixels": 1.92
  },
  "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": 1.638,
  "raw_drift_score": 10.2,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 736,
    "keypoints_staged": 902,
    "matches": 222,
    "affine_anisotropy": 0.0024,
    "inliers": 173,
    "inlier_ratio": 0.779,
    "median_residual_px": 0.53,
    "matrix_staged_to_original_work": [
      [
        1.00147,
        -0.00212,
        0.23027
      ],
      [
        0.00212,
        1.00147,
        -0.73275
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9985,
    "shift_px": [
      0.3,
      1.4
    ],
    "shift_pct": [
      0.02,
      0.12
    ],
    "rotation_deg": 0.121,
    "visible_overlap_pct": 99.97,
    "invented_area_pct": 0.19,
    "original_px_lost": {
      "left": 0.4,
      "right": 0.0,
      "top": 2.2,
      "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.9896,
      "line_displaced_frac": 0.0065,
      "line_missing_frac": 0.0039,
      "structural_line_pixels": 57202
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.9054,
    "line_recall": 0.9016,
    "line_displaced_frac": 0.0378,
    "line_missing_frac": 0.0607,
    "structural_line_pixels": 22032,
    "evaluated_area_frac": 0.647,
    "drift_score": 9.7,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.996,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 9.7,
  "structure": {
    "edge_ssim": 0.895,
    "line_recall": 0.9001,
    "line_displaced_frac": 0.0389,
    "line_missing_frac": 0.061,
    "structural_line_pixels": 22037,
    "evaluated_area_frac": 0.65,
    "drift_score": 10.2,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 180,
  "seconds_approx": true,
  "files": {
    "original": "photos/08-loft-kitchen-ducts.jpg",
    "staged": "results/virtualstagingflow/08.jpg"
  }
}