Skip to main content

pooled_modal_ground

Function pooled_modal_ground 

Source
pub fn pooled_modal_ground(images: &[CaptureImage]) -> [u8; 4]
Expand description

modal_ground over one histogram summed across every image — one ground for a whole series, from the same band mean and the same MIN_GROUND_SHARE rule.

For a caller that must hold one reference across many frames (the shot horizon, whose ruler may not move between rows) and cannot trust any single frame to carry it: a cellular world’s first frame is a seed soup near a 50 % tie, and pooling lets the settled frames outvote it. Every pixel weighs the same, so images of different sizes pool by pixel count, not per image.

modal_ground is this over a one-image slice, so the two cannot drift. An empty slice has no pixels and returns NO_GROUND.