smpy.filters.starlet.compute_starlet_nscales_max(height: int, width: int) int[source]

Compute the safe maximum nscales for a starlet transform.

The starlet (isotropic undecimated, à trous) transform produces J detail bands and one coarse residual. The number of scales is defined as nscales = J + 1. The B3–spline à trous kernel support at detail level j (0-indexed) is L_j = 4 * 2^j + 1 pixels. To avoid border- dominated coefficients, the coarsest detail (j = J - 1) must satisfy L_{J-1} <= N where N = min(height, width).

Parameters:
  • height (int) – Image height in pixels.

  • width (int) – Image width in pixels.

Returns:

nscales_max – Maximum safe number of starlet scales (detail bands + coarse).

Return type:

int