Internal helper that classifies which low-alpha pixels are part
of the exterior border region. Pixels below alpha_threshold are considered
low alpha. The algorithm starts from low-alpha pixels on the image boundary
and performs an 8-connected flood fill through other low-alpha pixels.
Low-alpha regions enclosed by pixels at or above alpha_threshold are not
reached, so they are protected from fill_alpha_gaps().
find_border_alpha_gaps(alpha, alpha_threshold = 0.25)Logical matrix marking low-alpha pixels connected to the image exterior.
Numeric alpha matrix.
Default 0.25. Pixels below this alpha are considered
low-alpha gap pixels.