{
  "original": {
    "width": 1600,
    "height": 1200,
    "megapixels": 1.92
  },
  "staged": {
    "width": 2390,
    "height": 1792,
    "megapixels": 4.28
  },
  "aspect_ratio": {
    "original": 1.3333,
    "staged": 1.3337,
    "deviation": 0.0003,
    "pass": true
  },
  "resolution_kept": true,
  "resolution_ratio": 2.231,
  "raw_drift_score": 51.5,
  "alignment": {
    "ok": true,
    "method": "SIFT + ratio test + RANSAC similarity (estimateAffinePartial2D)",
    "keypoints_original": 736,
    "keypoints_staged": 999,
    "matches": 151,
    "affine_anisotropy": 0.0341,
    "inliers": 33,
    "inlier_ratio": 0.219,
    "median_residual_px": 1.27,
    "matrix_staged_to_original_work": [
      [
        1.06741,
        0.03441,
        -76.82974
      ],
      [
        -0.03441,
        1.06741,
        189.66251
      ]
    ]
  },
  "framing": {
    "pass": false,
    "result": "fail: only 77.7% of the original frame visible; zoom 0.936; rotated -1.85 deg; 31.7% of the output is outside the original frame",
    "zoom": 0.9364,
    "shift_px": [
      -45.5,
      309.3
    ],
    "shift_pct": [
      -2.84,
      25.77
    ],
    "rotation_deg": -1.847,
    "visible_overlap_pct": 77.66,
    "invented_area_pct": 31.73,
    "original_px_lost": {
      "left": 0.0,
      "right": 12.2,
      "top": 296.3,
      "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.6606,
      "line_displaced_frac": 0.1985,
      "line_missing_frac": 0.1409,
      "structural_line_pixels": 37993
    },
    "note": "low-threshold Canny that also sees white wall/soffit/column edges; not part of drift_score"
  },
  "architecture": {
    "edge_ssim": 0.7412,
    "line_recall": 0.5139,
    "line_displaced_frac": 0.1602,
    "line_missing_frac": 0.3259,
    "structural_line_pixels": 15611,
    "evaluated_area_frac": 0.42,
    "drift_score": 37.2,
    "aligned": true,
    "evaluated_area_frac_of_mask": 0.646,
    "mask": "auto: top 65% of frame"
  },
  "drift_score": 37.2,
  "structure": {
    "edge_ssim": 0.621,
    "line_recall": 0.35,
    "line_displaced_frac": 0.143,
    "line_missing_frac": 0.507,
    "structural_line_pixels": 22037,
    "evaluated_area_frac": 0.65,
    "drift_score": 51.5,
    "mask": "auto: top 65% of frame",
    "note": "legacy unaligned structure check (= raw_drift_score)"
  },
  "seconds_to_result": null,
  "seconds_approx": true,
  "files": {
    "original": "photos/08-loft-kitchen-ducts.jpg",
    "staged": "results/stylesmarter/08.jpg"
  }
}