{
  "original": {
    "width": 1920,
    "height": 1528,
    "megapixels": 2.93
  },
  "staged": {
    "width": 2048,
    "height": 1621,
    "megapixels": 3.32
  },
  "aspect_ratio": {
    "original": 1.2565,
    "staged": 1.2634,
    "deviation": 0.0055,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 1.132,
  "raw_drift_score": 19.6,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 659,
    "keypoints_staged": 1172,
    "matches": 132,
    "affine_anisotropy": 0.0104,
    "inliers": 100,
    "inlier_ratio": 0.758,
    "median_residual_px": 0.91,
    "matrix_staged_to_original_work": [
      [
        1.0031,
        0.00105,
        -2.26882
      ],
      [
        -0.00105,
        1.0031,
        2.70832
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 0.9969,
    "shift_px": [
      -0.5,
      1.7
    ],
    "shift_pct": [
      -0.03,
      0.11
    ],
    "rotation_deg": -0.06,
    "visible_overlap_pct": 99.69,
    "invented_area_pct": 0.19,
    "original_px_lost": {
      "left": 0.0,
      "right": 0.0,
      "top": 5.1,
      "bottom": 1.6
    },
    "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.9745,
      "line_displaced_frac": 0.0248,
      "line_missing_frac": 0.0007,
      "structural_line_pixels": 57678
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7086,
    "line_recall": 0.8663,
    "line_displaced_frac": 0.1221,
    "line_missing_frac": 0.0116,
    "structural_line_pixels": 14731,
    "evaluated_area_frac": 0.641,
    "drift_score": 21.3,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.988,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 21.3,
  "structure": {
    "edge_ssim": 0.7207,
    "line_recall": 0.8876,
    "line_displaced_frac": 0.1025,
    "line_missing_frac": 0.0099,
    "structural_line_pixels": 14804,
    "evaluated_area_frac": 0.649,
    "drift_score": 19.6,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 53,
  "seconds_approx": true,
  "files": {
    "original": "photos/06-bedroom-single-window.jpg",
    "staged": "results/pedra/06.jpg"
  }
}