{
  "original": {
    "width": 1920,
    "height": 1484,
    "megapixels": 2.85
  },
  "staged": {
    "width": 2048,
    "height": 1584,
    "megapixels": 3.24
  },
  "aspect_ratio": {
    "original": 1.2938,
    "staged": 1.2929,
    "deviation": 0.0007,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 1.139,
  "raw_drift_score": 33.2,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 550,
    "keypoints_staged": 967,
    "matches": 154,
    "affine_anisotropy": 0.001,
    "inliers": 111,
    "inlier_ratio": 0.721,
    "median_residual_px": 0.77,
    "matrix_staged_to_original_work": [
      [
        1.00168,
        0.00045,
        -0.5451
      ],
      [
        -0.00045,
        1.00168,
        -0.5132
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9983,
    "shift_px": [
      0.9,
      0.8
    ],
    "shift_pct": [
      0.05,
      0.05
    ],
    "rotation_deg": -0.026,
    "visible_overlap_pct": 100.0,
    "invented_area_pct": 0.29,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 0.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.9364,
      "line_displaced_frac": 0.0625,
      "line_missing_frac": 0.0011,
      "structural_line_pixels": 83985
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7638,
    "line_recall": 0.5383,
    "line_displaced_frac": 0.1613,
    "line_missing_frac": 0.3004,
    "structural_line_pixels": 21347,
    "evaluated_area_frac": 0.65,
    "drift_score": 34.9,
    "aligned": true,
    "evaluated_area_frac_of_mask": 1.0,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 34.9,
  "structure": {
    "edge_ssim": 0.7714,
    "line_recall": 0.5638,
    "line_displaced_frac": 0.1466,
    "line_missing_frac": 0.2897,
    "structural_line_pixels": 21349,
    "evaluated_area_frac": 0.65,
    "drift_score": 33.2,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 170,
  "seconds_approx": true,
  "files": {
    "original": "photos/05-bay-window-fireplace.jpg",
    "staged": "results/virtualstagingflow/05.jpg"
  }
}