{
  "original": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "staged": {
    "width": 2528,
    "height": 1696,
    "megapixels": 4.29
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.4906,
    "deviation": 0.1179,
    "pass": false
  },
  "resolution_kept": true,
  "resolution_ratio": 3.489,
  "raw_drift_score": 33.0,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 577,
    "keypoints_staged": 1131,
    "matches": 213,
    "affine_anisotropy": 0.0001,
    "inliers": 192,
    "inlier_ratio": 0.901,
    "median_residual_px": 0.38,
    "matrix_staged_to_original_work": [
      [
        0.99339,
        -1e-05,
        3.36232
      ],
      [
        1e-05,
        0.99339,
        43.24072
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: only 88.6% of the original frame visible",
    "zoom": 1.0067,
    "shift_px": [
      -0.0,
      0.6
    ],
    "shift_pct": [
      -0.0,
      0.06
    ],
    "rotation_deg": 0.001,
    "visible_overlap_pct": 88.63,
    "invented_area_pct": 0.0,
    "original_px_lost": {
      "left": 4.2,
      "right": 4.3,
      "top": 54.1,
      "bottom": 52.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.9577,
      "line_displaced_frac": 0.0253,
      "line_missing_frac": 0.0169,
      "structural_line_pixels": 21325
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7548,
    "line_recall": 0.7791,
    "line_displaced_frac": 0.1269,
    "line_missing_frac": 0.0941,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.58,
    "drift_score": 23.3,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.893,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 23.3,
  "structure": {
    "edge_ssim": 0.7159,
    "line_recall": 0.624,
    "line_displaced_frac": 0.2708,
    "line_missing_frac": 0.1052,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.65,
    "drift_score": 33.0,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 190,
  "seconds_approx": true,
  "files": {
    "original": "photos/02-room-with-doorway.jpg",
    "staged": "results/tinty/02.jpg"
  }
}