mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
* Auto-Blend Stack Images: a depth map by depth from focus, for Lens Blur `edit.autoBlendLayers` with `method: stack` and `depthMap: true` adds a hidden gray Depth layer, the layer each pixel is sharpest in (black = the bottom layer, white = the top), from `photocraft_algo::dff`: the ring difference filter as focus measure, guided-filter aggregation with the merged picture as guide, a streaming peak search with Gaussian interpolation and a confidence, edge-aware weighted least squares solved by multigrid-preconditioned conjugate gradients, and guided upsampling. Once on a layer mask it drives Lens Blur's depth map. Closes #2067. Co-Authored-By: Claude Fable 5.1 <[email protected]> * Depth from focus: a guide or plane of the wrong length is the empty map Review follow-up on #2073: `depth_from_focus` is public and indexed `guide[i]` without checking that `guide` and every `luma` plane are `w × h` long. It now returns the empty map (depth 0, confidence 0) for a mismatch, before anything is read, and the test covers a short guide, a short plane and a size that matches neither. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>