import type { FloatBuffer } from "@thi.ng/pixel" ; import { convolveChannel , POOL_THRESHOLD } from "@thi.ng/pixel/convolve" ; param src param windowSize param offset export const adaptiveThreshold = ( src , windowSize , offset = 0 ) => convolveChannel ( src , { kernel : { pool : POOL_THRESHOLD ( offset / 255 ) , size : windowSize , } , } ) ;