Local neighbourhood sampling
Sample radius
Move the same eight offsets across the pixel grid
2 px
01
Sample the frame
The center stays fixed. Only the eight green sample positions move.
C
Center pixel
8 sampled pixels
↓
NEIGHBOURHOOD AVERAGE
N̄ = ⅛ Σ OKlab(Nᵢ)
↓
CENTER PIXEL
C = OKlab(center)
02
Compare center with neighbourhood
N̄ ↓
C ↓
LOCAL DIFFERENCE
C − N̄
↓
LIGHTNESS
ΔL = |Cₗ − N̄ₗ|
CHROMATIC
Δab = ‖Cₐᵦ − N̄ₐᵦ‖