Learn R Programming

rayimage (version 0.26.1)

offset_alpha: Offset Alpha Matrix

Description

Internal shift helper used by fill_alpha_gaps(). It returns a same-size alpha matrix shifted by integer row and column offsets, filling newly exposed pixels with zero instead of wrapping. This lets the gap-filling scan compare pixels a fixed distance away on opposite sides of a candidate gap.

Usage

offset_alpha(alpha, row_offset, col_offset)

Value

Numeric alpha matrix with the same dimensions as alpha.

Arguments

alpha

Numeric alpha matrix.

row_offset

Integer row offset. Positive values sample from rows below each output pixel.

col_offset

Integer column offset. Positive values sample from columns to the right of each output pixel.