{
  "original": {
    "width": 1280,
    "height": 960,
    "megapixels": 1.23
  },
  "staged": {
    "width": 2048,
    "height": 1536,
    "megapixels": 3.15
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3333,
    "deviation": 0.0,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 2.56,
  "raw_drift_score": 27.7,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 577,
    "keypoints_staged": 1487,
    "matches": 114,
    "affine_anisotropy": 0.0143,
    "inliers": 74,
    "inlier_ratio": 0.649,
    "median_residual_px": 0.65,
    "matrix_staged_to_original_work": [
      [
        1.00293,
        0.00027,
        0.14555
      ],
      [
        -0.00027,
        1.00293,
        0.46261
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9971,
    "shift_px": [
      2.2,
      1.8
    ],
    "shift_pct": [
      0.17,
      0.19
    ],
    "rotation_deg": -0.015,
    "visible_overlap_pct": 100.0,
    "invented_area_pct": 0.39,
    "original_px_lost": {
      "left": 0.4,
      "right": 0.0,
      "top": 0.6,
      "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.8793,
      "line_displaced_frac": 0.0969,
      "line_missing_frac": 0.0238,
      "structural_line_pixels": 22115
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.6377,
    "line_recall": 0.8305,
    "line_displaced_frac": 0.1166,
    "line_missing_frac": 0.053,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.65,
    "drift_score": 26.6,
    "aligned": true,
    "evaluated_area_frac_of_mask": 1.0,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 26.6,
  "structure": {
    "edge_ssim": 0.6301,
    "line_recall": 0.8165,
    "line_displaced_frac": 0.1236,
    "line_missing_frac": 0.0598,
    "structural_line_pixels": 5816,
    "evaluated_area_frac": 0.65,
    "drift_score": 27.7,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 30,
  "seconds_approx": true,
  "files": {
    "original": "photos/02-room-with-doorway.jpg",
    "staged": "results/pedra/02.jpg"
  }
}