fix(heal): eliminate boundary seams by windowing inpaint clusters to 1:1 scale and smoothing feather transition

This commit is contained in:
2026-10-14 17:35:27 +07:00
parent 8df0a03414
commit 4b5e55bc50
4 changed files with 35 additions and 11 deletions
+3 -3
View File
@@ -25,9 +25,9 @@ import type { HealSpot } from '../types';
export const HEAL_DEFAULT_R = 0.012;
// How much of a spot is painted at full strength, as a fraction of its radius:
// out to 95% the mask is solid to completely eliminate defects without leaving
// residual dirt/shadows, and the last 5% is a smooth Hermite fade to blend into the photo.
export const HEAL_FEATHER = 0.95;
// out to 75% the mask is solid to completely eliminate defects, and the outer 25%
// is a smooth Hermite fade (smoothstep) to blend invisibly into the surrounding photo.
export const HEAL_FEATHER = 0.75;
// The finest of the fill's blurs, as a multiple of the widest brush in the
// stroke. The light of the rim has to reach the middle of the hole, so the