{
  "original": {
    "width": 1920,
    "height": 1528,
    "megapixels": 2.93
  },
  "staged": {
    "width": 2048,
    "height": 1627,
    "megapixels": 3.33
  },
  "aspect_ratio": {
    "original": 1.2565,
    "staged": 1.2588,
    "deviation": 0.0018,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 1.136,
  "raw_drift_score": 16.0,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 659,
    "keypoints_staged": 1002,
    "matches": 196,
    "affine_anisotropy": 0.0005,
    "inliers": 168,
    "inlier_ratio": 0.857,
    "median_residual_px": 0.58,
    "matrix_staged_to_original_work": [
      [
        1.00309,
        0.00049,
        -1.73183
      ],
      [
        -0.00049,
        1.00309,
        1.03191
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9969,
    "shift_px": [
      0.1,
      2.9
    ],
    "shift_pct": [
      0.0,
      0.19
    ],
    "rotation_deg": -0.028,
    "visible_overlap_pct": 99.88,
    "invented_area_pct": 0.38,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 1.9,
      "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.9637,
      "line_displaced_frac": 0.0345,
      "line_missing_frac": 0.0018,
      "structural_line_pixels": 60816
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.8476,
    "line_recall": 0.8198,
    "line_displaced_frac": 0.0805,
    "line_missing_frac": 0.0997,
    "structural_line_pixels": 15472,
    "evaluated_area_frac": 0.643,
    "drift_score": 16.6,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.991,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 16.6,
  "structure": {
    "edge_ssim": 0.8484,
    "line_recall": 0.8325,
    "line_displaced_frac": 0.0619,
    "line_missing_frac": 0.1055,
    "structural_line_pixels": 14804,
    "evaluated_area_frac": 0.649,
    "drift_score": 16.0,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 160,
  "seconds_approx": true,
  "files": {
    "original": "photos/06-bedroom-single-window.jpg",
    "staged": "results/virtualstagingflow/06.jpg"
  }
}