itasc.core.imageops¶
Generic, deterministic image operations shared across ITASC pieces.
Pure functions with no ITASC dependencies, usable by segmentation, tracking, and any other consumer without pulling in a heavier subpackage.
Functions
|
Local-mean-subtracted residual: |
- itasc.core.imageops.residual(frame, window, strength=1.0)[source]¶
Local-mean-subtracted residual:
clip(frame - strength*localmean(frame), 0).Flattens each map’s per-nucleus offset so a single global threshold works everywhere while staying ~0 in flat background.
windowis forced odd.strengthblends between the raw map and the fully-flattened residual:1.0subtracts the whole local background (default),0.0subtracts nothing so the result is the raw (non-negative) map, and values in between partially flatten. Lowering it trades uniform-threshold behaviour for keeping more of the original signal where the background is already flat.