{
  "original": {
    "width": 1920,
    "height": 926,
    "megapixels": 1.78
  },
  "staged": {
    "width": 2528,
    "height": 1696,
    "megapixels": 4.29
  },
  "aspect_ratio": {
    "original": 2.0734,
    "staged": 1.4906,
    "deviation": 0.2811,
    "pass": false
  },
  "resolution_kept": true,
  "resolution_ratio": 2.412,
  "raw_drift_score": 60.7,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 164,
    "keypoints_staged": 762,
    "matches": 33,
    "affine_anisotropy": 0.0006,
    "inliers": 25,
    "inlier_ratio": 0.758,
    "median_residual_px": 0.46,
    "matrix_staged_to_original_work": [
      [
        0.71859,
        0.00019,
        144.29275
      ],
      [
        -0.00019,
        0.71859,
        0.06846
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: only 72.0% of the original frame visible; zoom 1.392",
    "zoom": 1.3916,
    "shift_px": [
      0.5,
      -0.4
    ],
    "shift_pct": [
      0.03,
      -0.04
    ],
    "rotation_deg": -0.015,
    "visible_overlap_pct": 71.97,
    "invented_area_pct": 0.0,
    "original_px_lost": {
      "left": 270.8,
      "right": 269.8,
      "top": 0.1,
      "bottom": 0.9
    },
    "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.809,
      "line_displaced_frac": 0.0448,
      "line_missing_frac": 0.1462,
      "structural_line_pixels": 10263
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7801,
    "line_recall": 0.5548,
    "line_displaced_frac": 0.0674,
    "line_missing_frac": 0.3778,
    "structural_line_pixels": 6109,
    "evaluated_area_frac": 0.462,
    "drift_score": 33.3,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.711,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 33.3,
  "structure": {
    "edge_ssim": 0.6745,
    "line_recall": 0.1123,
    "line_displaced_frac": 0.0861,
    "line_missing_frac": 0.8016,
    "structural_line_pixels": 9633,
    "evaluated_area_frac": 0.65,
    "drift_score": 60.7,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 52,
  "seconds_approx": true,
  "files": {
    "original": "photos/04-attic-odd-windows.jpg",
    "staged": "results/tinty/04.jpg"
  }
}