{
  "original": {
    "width": 1920,
    "height": 1484,
    "megapixels": 2.85
  },
  "staged": {
    "width": 2304,
    "height": 1792,
    "megapixels": 4.13
  },
  "aspect_ratio": {
    "original": 1.2938,
    "staged": 1.2857,
    "deviation": 0.0062,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 1.449,
  "raw_drift_score": 18.8,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 550,
    "keypoints_staged": 904,
    "matches": 152,
    "affine_anisotropy": 0.0058,
    "inliers": 107,
    "inlier_ratio": 0.704,
    "median_residual_px": 0.79,
    "matrix_staged_to_original_work": [
      [
        0.99302,
        -0.0005,
        3.34083
      ],
      [
        0.0005,
        0.99302,
        0.94122
      ]
    ]
  },
  "framing": {
    "pass": true,
    "result": "pass",
    "zoom": 1.007,
    "shift_px": [
      -0.8,
      1.7
    ],
    "shift_pct": [
      -0.04,
      0.12
    ],
    "rotation_deg": 0.029,
    "visible_overlap_pct": 99.29,
    "invented_area_pct": 0.0,
    "original_px_lost": {
      "left": 6.3,
      "right": 7.9,
      "top": 2.7,
      "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.9572,
      "line_displaced_frac": 0.0428,
      "line_missing_frac": 0.0,
      "structural_line_pixels": 80456
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.8333,
    "line_recall": 0.8936,
    "line_displaced_frac": 0.077,
    "line_missing_frac": 0.0294,
    "structural_line_pixels": 21434,
    "evaluated_area_frac": 0.634,
    "drift_score": 13.7,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.976,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 13.7,
  "structure": {
    "edge_ssim": 0.7937,
    "line_recall": 0.8307,
    "line_displaced_frac": 0.1433,
    "line_missing_frac": 0.026,
    "structural_line_pixels": 21349,
    "evaluated_area_frac": 0.65,
    "drift_score": 18.8,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": 12.2,
  "seconds_approx": true,
  "files": {
    "original": "photos/05-bay-window-fireplace.jpg",
    "staged": "results/reimaginehome/05.jpg"
  }
}