{
  "original": {
    "width": 1600,
    "height": 1200,
    "megapixels": 1.92
  },
  "staged": {
    "width": 1448,
    "height": 1086,
    "megapixels": 1.57
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3333,
    "deviation": 0.0,
    "pass": true
  },
  "resolution_kept": false,
  "resolution_ratio": 0.819,
  "raw_drift_score": 51.6,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 736,
    "keypoints_staged": 1751,
    "matches": 156,
    "affine_anisotropy": 0.0235,
    "inliers": 37,
    "inlier_ratio": 0.237,
    "median_residual_px": 1.04,
    "matrix_staged_to_original_work": [
      [
        1.01959,
        0.00383,
        -16.56617
      ],
      [
        -0.00383,
        1.01959,
        67.1648
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: only 91.5% of the original frame visible; zoom 0.981; 11.8% of the output is outside the original frame",
    "zoom": 0.9808,
    "shift_px": [
      -7.9,
      113.6
    ],
    "shift_pct": [
      -0.49,
      9.47
    ],
    "rotation_deg": -0.215,
    "visible_overlap_pct": 91.54,
    "invented_area_pct": 11.77,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 104.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.7295,
      "line_displaced_frac": 0.2098,
      "line_missing_frac": 0.0607,
      "structural_line_pixels": 44385
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.6391,
    "line_recall": 0.5863,
    "line_displaced_frac": 0.2125,
    "line_missing_frac": 0.2012,
    "structural_line_pixels": 17124,
    "evaluated_area_frac": 0.56,
    "drift_score": 38.7,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.861,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 38.7,
  "structure": {
    "edge_ssim": 0.548,
    "line_recall": 0.4209,
    "line_displaced_frac": 0.1633,
    "line_missing_frac": 0.4158,
    "structural_line_pixels": 22037,
    "evaluated_area_frac": 0.65,
    "drift_score": 51.6,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/08-loft-kitchen-ducts.jpg",
    "staged": "results/immostage/08.jpg"
  }
}